STRUCT LM3532_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct lm3532_data(9) β€” the kernel API manual, but make it cute ✨

okay so bestie, welcome to the <pink>lm3532_data</pink> glow-up page πŸ’… this is a struct from the Kernel API Manual and it's genuinely the main character of the LM3532 LED driver situation. no cap.


🌸 NAME 🌸

struct lm3532_data β€” literally the struct 🫢 (the original NAME line is just the struct name, so yeah, that's the whole vibe)


✨ SYNOPSIS ✨

here's the shape of it, copied exactly because we do not mess with code:

struct lm3532_data {
    struct gpio_desc *enable_gpio;
    struct regulator *regulator;
    struct i2c_client *client;
    struct regmap *regmap;
    struct device *dev;
    struct mutex lock;
    struct lm3532_als_data *als_data;
    u32 runtime_ramp_up;
    u32 runtime_ramp_down;
    struct lm3532_led leds[];
 };

like, look at her. she's got pointers, she's got a mutex, she's got a flexible array at the end. iconic πŸ’€βœ¨


πŸŽ€ Members πŸŽ€

okay so let's go through every single member, because we are not skipping any πŸ“

  • enable_gpio β€” the hardware enable gpio. it's a struct gpio_desc *, and it's the one doing the hardware-enable thing, iykyk.
  • regulator β€” the regulator πŸ’– (yes that's the whole description, and yes it's still important).
  • client β€” the i2c client.
  • regmap β€” the device's register map. this is where the register magic lives πŸ”₯
  • dev β€” a pointer to the device's struct device. the whole "which device even am I" of it all.
  • lock β€” the lock for reading/writing the device. take it before you touch the registers, bestie, fr fr πŸ”’
  • als_data β€” a pointer to the als data struct (struct lm3532_als_data *). ambient light sensing vibes, no cap.
  • runtime_ramp_up β€” the runtime ramp up setting.
  • runtime_ramp_down β€” the runtime ramp down setting. she's the cooler sister of the one above, lowkey.
  • leds β€” an array of LED strings. it's struct lm3532_led leds[], a flexible array member, and yes it's last in the struct for a reason πŸ‘‘

🌈 SEE ALSO 🌈

  • the kernel file ./drivers/leds/leds-lm3532.c
  • struct lm3532_led(9) β€” the other struct, go look at her too πŸ¦‹

and that's the whole page, bestie, you ate it up πŸ’…πŸ’–

oh and the footer stuff? it came from the ./drivers/leds corner of the kernel tree, dated October 2026, and the page is, obviously, struct lm3532_data(9). slay βœ¨πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from