leds: qti-flash: Add support for on_time and off_time parameters
Add support to enable switch after a delay of on_time milliseconds
and to disable switch after a delay of off_time milliseconds. Adding
delays to turn ON and OFF the switch is required by flash client
(camera) for fine precision flash control.
Add sysfs support to configure on_time and off_time for switch devices.
E.g. To configure ON time of 1 second and OFF time of 0.5 seconds on
switch 0 and strobing flash LED 0,
echo 300 > /sys/class/leds/leds:flash_0/flash_brightness
echo 1000 > /sys/class/leds/led:switch_0/on_time
echo 500 > /sys/class/leds/led_switch_0/off_time
echo 1 > /sys/class/leds/led_switch_0/brightness
Change-Id: I343eddf097bc7bb9960cd3fd4934c9b0a40cf450
Signed-off-by:
Shyam Kumar Thella <sthella@codeaurora.org>
Loading
Please register or sign in to comment