On 12 October 2016 at 13:16, Karl Palsson <ka...@tweak.net.au> wrote: > Rafał Miłecki <zaj...@gmail.com> wrote: >> 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/*/ >> > > Related, even with leds set in /etc/config/system, their triggers > aren't setup until S96. How can they get setup earlier?
Well, replace 96 with a lower value? Sounds trivial to try. > I've got > a daemon that wants a led trigger file to be passed in for it to > write to on activity, but the triggers aren't set. Is > /etc/config/system ever actually useful for leds? It is as long as you don't use some specific deamon I guess. Works for me just fine. -- Rafał _______________________________________________ Lede-dev mailing list Ledeemail@example.com http://lists.infradead.org/mailman/listinfo/lede-dev