STRUCT LM3560_FLASH(9)
πΈ struct lm3560_flash(9) πΈ
okay bestie, welcome to the Kernel API Manual β yes, that's the manual name, and yes, we're getting into it. this page is all about struct lm3560_flash, the little data bundle that runs the LM3560 flash LED driver. it's giving driver core energy and honestly? iconic. β¨
π NAME π
struct lm3560_flash β
so likeβ¦ the original page literally just puts a dash and then nothing. no description. zero. nada. the void. π« we're keeping it that way because the vibes are the vibes, but don't worry β the SYNOPSIS and Members sections below absolutely deliver the lore. π₯
β¨ SYNOPSIS β¨
struct lm3560_flash {
struct device *dev;
struct regmap *regmap;
struct mutex lock;
struct gpio_desc *hwen_gpio;
struct regulator *vin_supply;
enum v4l2_flash_led_mode led_mode;
struct v4l2_ctrl_handler ctrls_led[LM3560_LED_MAX];
struct v4l2_subdev subdev_led[LM3560_LED_MAX];
unsigned long led_id[BITS_TO_LONGS( LM3560_LED_MAX)];
enum lm3560_peak_current peak;
u32 max_flash_timeout;
u32 max_flash_brt[LM3560_LED_MAX];
u32 max_torch_brt[LM3560_LED_MAX];
const struct lm3560_flash_config *config;
};
look at all those members. the way this struct is packed with lore β we love a well-organized queen. π
π Members π
devβ pointer tostruct device. the main character's backstage pass to the device model. πregmapβ reg. map for i2c. yes, the original says "reg. map" with the little period. we respect the punctuation. it's how the driver talks over i2c. π¦lockβ muxtex for serial access. (that's the original spelling, bestie, and honestlymuxtexis kind of a serve.) this is the mutex keeping things from stepping on each other. πhwen_gpioβ line connected to HWEN pin. hardware enable, slay. β‘vin_supplyβ line connected to IN supply (2.5V-5.5V). power, periodt. πled_modeβ V4L2 LED mode. it's anenum v4l2_flash_led_mode, so you know it's official. πctrls_ledβ V4L2 controls. onestruct v4l2_ctrl_handlerper LED,LM3560_LED_MAXof them. ποΈsubdev_ledβ V4L2 subdev. same deal βstruct v4l2_subdevarray,LM3560_LED_MAXentries. πΈled_idβ LED status holder. declared asunsigned long led_id[BITS_TO_LONGS( LM3560_LED_MAX)]β keeping that inner space exactly, no cap. πpeakβ peak current, typed asenum lm3560_peak_current. πmax_flash_timeoutβ flash timeout, au32. β±οΈmax_flash_brtβ flash mode led brightness,u32array sizedLM3560_LED_MAX. so bright. β¨max_torch_brtβ torch mode led brightness, also au32array sizedLM3560_LED_MAX. torch mode is lowkey the underrated one, ngl. π―οΈconfigβ device specific current configuration, tucked away as aconst struct lm3560_flash_config *. the final boss of the struct. π
π¦ SEE ALSO π¦
- Kernel file
./drivers/media/i2c/lm3560.cβ like, go read the actual source if you want the full picture, bestie. π«Ά
okay that's the whole page!! no skips, no skimming, every single member accounted for. π―
and for the cute sign-off: this lil slice of kernel documentation comes from the source path ./drivers/media/i2c, dated October 2026. remember it fondly, and go forth and flash 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