STRUCT MT6323_LEDS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct mt6323_leds β€” the main character πŸ’…

okay so bestie, welcome to the Kernel API Manual, section 9 πŸŽ€ β€” this is the whole entire page for struct mt6323_leds, and it is literally the state container for holding the LED controller of the driver. no cap, that's the whole vibe: it's the little basket that keeps all the LED-controller state together 🧺✨


✨ NAME ✨

struct mt6323_leds β€” state container for holding LED controller of the driver πŸ¦‹

like, the ✨container✨ of state for the driver's LED controller. that's her job. she holds the state. periodt.


🌸 SYNOPSIS 🌸

struct mt6323_leds {
    struct device           *dev;
    struct mt6397_chip      *hw;
    const struct mt6323_data *pdata;
    struct mutex            lock;
    struct mt6323_led       *led[MAX_SUPPORTED_LEDS];
 };

yes the indentation is like that, bestie β€” copy it exactly, don't come for me πŸ™ˆ (also peep that MAX_SUPPORTED_LEDS cap on the array, iykyk πŸ‘‘)


🫢 Members 🫢

  • dev β€” the device pointer πŸ’– like the actual device's calling card, ngl.
  • hw β€” the underlying hardware providing shared bus for the register operations πŸ”₯ that's the hardware holding down the shared bus so all the register ops can happen. teamwork, fr fr.
  • pdata β€” device specific data 🌈 the data that's specific to this device. no generic nonsense here.
  • lock β€” the lock among process context πŸ”’ the lock chillin' among process context. she keeps things civil in there, okay?
  • led β€” the array that contains the state of individual LED device πŸ’‘β­ it's an array, and each slot holds the state of an individual LED device. one slot per LED, iconic.

πŸ’€ friendly reminder bestie: led is an array capped at MAX_SUPPORTED_LEDS, so don't go indexing past that, okay? we are not doing undefined behaviour today πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/leds/leds-mt6323.c
  • struct mt6323_led(9)
  • struct mt6323_regs(9)
  • struct mt6323_hwspec(9)
  • struct mt6323_data(9)

go read the whole friend group, they're all linked up 🫢✨


so yeah, that's the page πŸŽ€ huge shoutout to ./drivers/leds for housing this whole situation, dated October 2026 ⭐ and this was struct mt6323_leds(9) β€” thanks for coming to my TED talk, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from