STRUCT LM3601X_LED(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct lm3601x_led β€” the private lm3601x LED data, bestie πŸ’…

Okay so this is a page straight out of the Kernel API Manual, section 9, and it's literally just the little struct where the lm3601x LED driver keeps all its own business. Private data, nobody else's vibe. πŸŽ€


✨ SYNOPSIS ✨

struct lm3601x_led {
    struct led_classdev_flash fled_cdev;
    struct i2c_client *client;
    struct regmap *regmap;
    struct mutex lock;
    unsigned int flash_timeout;
    unsigned int last_flag;
    u32 torch_current_max;
    u32 flash_current_max;
    u32 max_flash_timeout;
    u32 led_mode;
 };

That's the whole struct, no cap. Every field, exactly as it lives in the header. 🫢


🌸 Members 🌸

Buckle up, we're doing a field-by-field vibe check, and every single one is getting its moment:

  • fled_cdev β€” the flash LED class device pointer. This is the main character energy of the struct, the actual LED-class-device-flash thing it's attached to. ⭐
  • client β€” Pointer to the I2C client. iykyk, it's how we talk to the chip. πŸ¦‹
  • regmap β€” Devices register map. The map of all the registers, aka the group chat where the hardware actually lives. πŸ’œ
  • lock β€” Lock for reading/writing the device. Protect the registers, protect the peace, don't let two threads body-check each other. πŸ”’
  • flash_timeout β€” the timeout for the flash. Literally the flash's timeout. That's it, that's the whole field. 😭
  • last_flag β€” last known flags register value. A little snapshot of what the flags register said last time we looked, like a screenshot of the conversation. πŸ™ˆ
  • torch_current_max β€” maximum current for the torch. Torch mode goes brrr, but only up to this. πŸ”₯
  • flash_current_max β€” maximum current for the flash. Same energy, flash mode, top current allowed. ⚑
  • max_flash_timeout β€” maximum timeout for the flash. The flash can't stay on longer than this, periodt. ⏰
  • led_mode β€” The mode to enable either IR or Torch. Pick your fighter: infrared or torch. 🧚
None of these are optional to mention β€” they're all real fields and I'm not skipping a single one, bestie. Not one. πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/leds/flash/leds-lm3601x.c β€” go read the source, that's where all the lore is πŸ‘‘

Alright, that's the whole page, and honestly? Iconic. πŸŽ€ The source of all this wisdom lives at ./drivers/leds/flash, dated October 2026, and it's the struct lm3601x_led(9) page from the Kernel API Manual β€” so if you ever need to remember what's in that struct, you know exactly where to come back. Slay, stay registered, and don't touch the registers without the lock. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from