STRUCT LM3692X_LED(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, and enabled are 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