v4l2_flash_indicator_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, this is the v4l2_flash_indicator_init(9) page from the Kernel API Manual β€” and yes, we're making V4L2 indicator sub-device init make sense together πŸ’–

✨ NAME ✨

v4l2_flash_indicator_init β€” initialize V4L2 indicator sub-device. That's the whole mission statement, and it ate πŸ’…

🌸 SYNOPSIS 🌸

Here's the signature, no cap β€” keep it exact:

struct v4l2_flash * v4l2_flash_indicator_init (struct device *dev ,
struct fwnode_handle *fwn , struct led_classdev *iled_cdev , struct
v4l2_flash_config *config );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” flash device, e.g. an I2C device. This is the device handing over the flash vibes.
  • fwn β€” fwnode_handle of the LED, may be NULL if the same as device's. Lowkey important: same-as-device means you can pass NULL.
  • iled_cdev β€” LED flash class device representing the indicator LED. The indicator LED's whole representative.
  • config β€” initialization data for V4L2 Flash sub-device. This is the setup info the sub-device gets.

✨ DESCRIPTION ✨

Okay so this function creates a V4L2 Flash sub-device that wraps the given LED subsystem device. The ops pointer is stored by the V4L2 flash framework. No references are held to config nor its contents once this function has returned β€” that's the rule, bestie, so don't go thinking it'll cling to them 🫢

πŸ”₯ RETURN πŸ”₯

You get a valid pointer, or β€” when an error occurs β€” the return value is encoded using ERR_PTR. Use IS_ERR to check and PTR_ERR to obtain the numeric return value. Basically: do the vibe check with IS_ERR, then pull the number with PTR_ERR πŸ’…

πŸ‘€ SEE ALSO πŸ‘€

Cute sign-off: source ./include/media, October 2026, page v4l2_flash_indicator_init(9) β€” periodt, bye bestie πŸ’…πŸ«Ά

πŸ“¦ where this page comes from