v4l2_flash_indicator_init(9)
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_handleof the LED, may beNULLif the same as device's. Lowkey important: same-as-device means you can passNULL.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 π
- Kernel file
./include/media/v4l2-flash-led-class.h struct v4l2_flash_ctrl_data(9)struct v4l2_flash_ops(9)struct v4l2_flash_config(9)struct v4l2_flash(9)v4l2_subdev_to_v4l2_flash(9)v4l2_ctrl_to_v4l2_flash(9)v4l2_flash_init(9)v4l2_flash_release(9)
Cute sign-off: source ./include/media, October 2026, page v4l2_flash_indicator_init(9) β periodt, bye bestie π
π«Ά
π¦ 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