STRUCT LM3532_DATA(9)
π 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 astruct 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'sstruct 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'sstruct 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms