xnux.eu - site map - news

PinePhone Flash LED

z3ntu works on a driver in this kernel branch

I haven't tested this yet. It is supposed to integrate well with video4linux2 APIs and the camera driver in the future.

It will also be possible to enable/disable the flash LED in continuous flashlight mode, or in a one-shot high powered high intensity mode (mostly for camera use). In one-shot mode the power consumption is high and the LED presumably heats up quite a bit.

Flash LED is connected to PC3 (FLASH-EN) and PD24 (FLASH-TRIG). If you don't have the above driver, you can control the flash via GPIO/sysfs interface.

For example, to turn on the flashlight:

grep -h PC3 /sys/kernel/debug/pinctrl/*/pinmux-pins
# pin 67 (PC3): UNCLAIMED
echo $pin_number > /sys/class/gpio/export
echo high > /sys/class/gpio/gpio$pin_number/direction

And to turn it off:

echo in > /sys/class/gpio/gpio$pin_number/direction