Initial Torch / Flash support
This is an initial driver for the torch/flash chip. I haven't tested the flash functionality yet but torch works (treating the two leds just as one for the moment).
TODOs (for upstream submission):
- handle leds separately (athough they're always forced to the same mode)
- support strobe gpio
- tie into v4l via v4l2_flash
- runtime pm
- describe bindings
But i think this should be good enough initially to help librem5-apps/librem5-goodies!12 (closed)
Testing
for i in `seq 1 8` 0; do echo $i > /sys/class/leds/white\:torch/brightness; sleep 0.5 ; done
echo 1 > /sys/class/leds/white\:torch/flash_strobe ; echo 0 > /sys/class/leds/white\:torch/flash_strobe
Closes: #211 (closed)
Merge request reports
Activity
mentioned in merge request librem5-apps/librem5-goodies!12 (closed)
- Resolved by Sebastian Krzyszkowiak
- Resolved by Guido Gunther
@guido.gunther why this driver when in the mainline tree there is
CONFIG_VIDEO_LM3560
("This is a driver for the lm3560 dual flash controllers. It controls flash, torch LEDs.")? That looks like it does what we want and just needs "of_" dts hook-ups.
marked as a Work In Progress from guido.gunther/linux-next@f92a80c3
- Resolved by Martin Kepplinger
works for me. could you add a link to the upstream discussion to https://source.puri.sm/Librem5/linux-next/-/issues/211 (and keep it open)? Since it's a nice self-contained driver IMO we can merge this.
- Resolved by Guido Gunther
I think the current values may be too high, I've seen the LEDs blinking and turning off when playing with it a bit. You may want to take a look at discussion in https://source.puri.sm/Librem5/linux-protected/-/issues/28#note_76734
Edited by Sebastian Krzyszkowiak