STRUCT MT6323_LEDS(9)
β¨ 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:ledis an array capped atMAX_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
- 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