Fw: fix green/blue pio-led on bpi-r2

From: Frank Wunderlich
Date: Fri May 25 2018 - 11:51:48 EST


Resend to Mailinglist because of previous blocked cause of html-format

Gesendet:ÂFreitag, 25. Mai 2018 um 17:47 Uhr
Von:Â"Frank Wunderlich" <FrankWu@xxxxxx>
An:Â"Matthias Brugger" <matthias.bgg@xxxxxxxxx>, "Rob Herring" <robh+dt@xxxxxxxxxx>, "Mark Rutland" <mark.rutland@xxxxxxx>, "Russell King" <linux@xxxxxxxxxxxxxxx>
Cc:Âlinux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Betreff:Âfix green/blue pio-led on bpi-r2

Hi,
Â
i've tested LEDs on bananapi-r2 and see that they stay on at boot-time and can be switched off by "echo 0", as this behaviour is not logical i changed that. Also green and blue are swapped by access their names in sysfs.
Â
http://forum.banana-pi.org/t/control-on-board-leds/4287/33
Â
hoping everything is alright with the patch (it's my first on here)
Â
to test it:
Â
[16:08] root@bpi-r2:~# L=/sys/class/leds/bpi-r2\:isink
[17:41] root@bpi-r2:~# L2=/sys/class/leds/bpi-r2\:pio
[17:42] root@bpi-r2:~# echo 1 > $L2:green/brightness
[17:42] root@bpi-r2:~# echo 1 > $L2:blue/brightness
[17:42] root@bpi-r2:~# echo 0 > $L2:green/brightness
[17:42] root@bpi-r2:~# echo 0 > $L2:blue/brightness
Â
at least options needed:
CONFIG_SYSFS=y
CONFIG_GPIO_SYSFS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_MT6323=y
CONFIG_LEDS_GPIO=y
Â
regards Frank
Â