[LEDE-DEV] Support for KEY_BRIGHTNESS_ZERO

Rafał Miłecki zajec5 at gmail.com
Wed Oct 12 01:39:56 PDT 2016


There are some (rare) devices with a button for disabling LEDs (e.g.
ASUS RT-AC68U). I'm looking for a way to support such a feature. Maybe
at some point we could also support it as an extra feature triggerable
from UI.

So basically I probably need to add some smart /etc/rc.button/
handler. Unfortunately I don't have a good idea for that.

I can't relay on /etc/config/system and LEDs there as not all of them
are specified there. Many LEDs don't require changing and they are set
to default state based on platform/DT data.

So I guess I should somehow store state of all LEDs from
/sys/class/leds/ and set their triggers to "none". When receiving
KEY_BRIGHTNESS_ZERO I should restore the state.

Any tips for implementing this? There are various triggers with
various extra settings in /sys/class/leds/*/

-- 
Rafał



More information about the Lede-dev mailing list