STRUCT LM3560_FLASH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 to struct 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 honestly muxtex is 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 an enum v4l2_flash_led_mode, so you know it's official. 🌈
  • ctrls_led β€” V4L2 controls. one struct v4l2_ctrl_handler per LED, LM3560_LED_MAX of them. πŸŽ›οΈ
  • subdev_led β€” V4L2 subdev. same deal β€” struct v4l2_subdev array, LM3560_LED_MAX entries. πŸ“Έ
  • led_id β€” LED status holder. declared as unsigned long led_id[BITS_TO_LONGS( LM3560_LED_MAX)] β€” keeping that inner space exactly, no cap. πŸ“
  • peak β€” peak current, typed as enum lm3560_peak_current. πŸ”‹
  • max_flash_timeout β€” flash timeout, a u32. ⏱️
  • max_flash_brt β€” flash mode led brightness, u32 array sized LM3560_LED_MAX. so bright. ✨
  • max_torch_brt β€” torch mode led brightness, also a u32 array sized LM3560_LED_MAX. torch mode is lowkey the underrated one, ngl. πŸ•―οΈ
  • config β€” device specific current configuration, tucked away as a const 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