STRUCT LM3692X_LED(9)
π NAME π
struct lm3692x_led β bestie, the description is literally empty. Just a dash. The manpage said "and?" and moved on. No cap. It's giving mysterious main character energy. π
So welcome to the kernel API manual, where we're about to meet the struct that runs the LM3692x LED show. Pull up a chair. π¦
β¨ SYNOPSIS β¨
Okay so here's the whole vibe, verbatim, don't touch a single character:
struct lm3692x_led {
struct mutex lock;
struct i2c_client *client;
struct led_classdev led_dev;
struct regmap *regmap;
struct gpio_desc *enable_gpio;
struct regulator *regulator;
int led_enable;
int model_id;
u8 boost_ctrl, brightness_ctrl;
bool enabled;
};
Look at that. Ten fields, one absolute icon of a struct. π₯
πΈ Members πΈ
Time for the roll call β every single member, no skipping, we don't do that here π
lockβ the lock for reading/writing the device. It's the bouncer at the club, keeping your reads and writes from bumping into each other. π«Άclientβ pointer to the I2C client. Yeah, the whole "talking to the chip" situation lives here. πled_devβ the LED class device pointer. This is where the LED-ness is officially registered. Iconic. πregmapβ the device's register map. Your handy little translation layer for poking registers. πΊοΈenable_gpioβ the VDDIO/EN gpio used to enable the communication interface. No enable, no talking. Simple as that. β‘regulatorβ pointer to the LED supply regulator. Power supply representation, we love to see it. πled_enableβ the LED sync to be enabled. Yep, that's the field. That's what it do. β¨model_idβ the current device model ID, enumerated. Which flavour of chip are we on? This knows. π·οΈboost_ctrlβ cached configuration for the boost control register. Cached, so we're not re-reading it like a clown. πΎbrightness_ctrlβ cached configuration for the brightness/brightness control. That's right, brightness slash brightness. The manpage said it twice and honestly? Same. π‘enabledβ cached enable state of the device. Is it on? Ask this bool. β
Lowkey important:boost_ctrl,brightness_ctrl, andenabledare all cached states β the struct is holding onto them so you don't have to go bothering the hardware every single time. Ngl, efficient queen behaviour. π
π¦ SEE ALSO π¦
If you want the real, actual, non-group-chat version of events:
- Kernel file
./drivers/leds/leds-lm3692x.cβ go read the source bestie, that's where the lore lives πβ¨
Okay bye ily! This has been struct lm3692x_led(9) from the Kernel API Manual, living in ./drivers/leds, dated October 2026 β go forth and blink those LEDs responsibly π§π
π¦ 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