1-
1+ ==============================
22Flash LED handling under Linux
33==============================
44
55Some LED devices provide two modes - torch and flash. In the LED subsystem
6- those modes are supported by LED class (see Documentation/leds/leds-class.txt )
6+ those modes are supported by LED class (see Documentation/leds/leds-class.rst )
77and LED Flash class respectively. The torch mode related features are enabled
88by default and the flash ones only if a driver declares it by setting
99LED_DEV_CAP_FLASH flag.
@@ -14,6 +14,7 @@ registered in the LED subsystem with led_classdev_flash_register function.
1414
1515Following sysfs attributes are exposed for controlling flash LED devices:
1616(see Documentation/ABI/testing/sysfs-class-led-flash)
17+
1718 - flash_brightness
1819 - max_flash_brightness
1920 - flash_timeout
@@ -31,30 +32,46 @@ be defined in the kernel config.
3132
3233The driver must call the v4l2_flash_init function to get registered in the
3334V4L2 subsystem. The function takes six arguments:
34- - dev : flash device, e.g. an I2C device
35- - of_node : of_node of the LED, may be NULL if the same as device's
36- - fled_cdev : LED flash class device to wrap
37- - iled_cdev : LED flash class device representing indicator LED associated with
38- fled_cdev, may be NULL
39- - ops : V4L2 specific ops
40- * external_strobe_set - defines the source of the flash LED strobe -
35+
36+ - dev:
37+ flash device, e.g. an I2C device
38+ - of_node:
39+ of_node of the LED, may be NULL if the same as device's
40+ - fled_cdev:
41+ LED flash class device to wrap
42+ - iled_cdev:
43+ LED flash class device representing indicator LED associated with
44+ fled_cdev, may be NULL
45+ - ops:
46+ V4L2 specific ops
47+
48+ * external_strobe_set
49+ defines the source of the flash LED strobe -
4150 V4L2_CID_FLASH_STROBE control or external source, typically
4251 a sensor, which makes it possible to synchronise the flash
4352 strobe start with exposure start,
44- * intensity_to_led_brightness and led_brightness_to_intensity - perform
53+ * intensity_to_led_brightness and led_brightness_to_intensity
54+ perform
4555 enum led_brightness <-> V4L2 intensity conversion in a device
4656 specific manner - they can be used for devices with non-linear
4757 LED current scale.
48- - config : configuration for V4L2 Flash sub-device
49- * dev_name - the name of the media entity, unique in the system,
50- * flash_faults - bitmask of flash faults that the LED flash class
58+ - config:
59+ configuration for V4L2 Flash sub-device
60+
61+ * dev_name
62+ the name of the media entity, unique in the system,
63+ * flash_faults
64+ bitmask of flash faults that the LED flash class
5165 device can report; corresponding LED_FAULT* bit definitions are
5266 available in <linux/led-class-flash.h>,
53- * torch_intensity - constraints for the LED in TORCH mode
67+ * torch_intensity
68+ constraints for the LED in TORCH mode
5469 in microamperes,
55- * indicator_intensity - constraints for the indicator LED
70+ * indicator_intensity
71+ constraints for the indicator LED
5672 in microamperes,
57- * has_external_strobe - determines whether the flash strobe source
73+ * has_external_strobe
74+ determines whether the flash strobe source
5875 can be switched to external,
5976
6077On remove the v4l2_flash_release function has to be called, which takes one
0 commit comments