Thread (6 messages) 6 messages, 2 authors, 2021-06-22

Re: [PATCH v2] platform/x86: add support for Acer Predator LEDs

From: Hans de Goede <hidden>
Date: 2021-06-16 17:50:13
Also in: linux-leds, platform-driver-x86

Hi,

On 6/16/21 7:20 PM, Enrico Weigelt, metux IT consult wrote:
On 16.06.21 17:56, leo60228 wrote:
quoted
quoted
Can you please tell a bit more what these LEDs are actually used for ?
Do they have some names or symbols ? Are they also controlled by
something else (e.g. numlock or shiftlock leds)
They're used for the keyboard backlight. This functionality is pretty common on gaming laptops.
hmm, keyboard backlight ... don't we already have something for that
in input subsys ? I believe that some lone LEDs aren't the right subsys
for those stuff.
Actually the standardized userspace API for exporting keyboard backlights
is using the LED class sysfs API, e.g.:

cat /sys/class/leds/tpacpi\:\:kbd_backlight/brightnes

And the same for Dell and other kbd backlights, also the upower
daemon even has code for dealing with kbd-backlights:
https://gitlab.freedesktop.org/upower/upower/-/blob/master/src/up-kbd-backlight.c
exporting them over its dbus API so that non-root users can
control them.

Basically using the LED class for kbd-backlight functionality
basically is the defacto standard under Linux, so exposing this
through the LED class is definitely the right thing to do.

Since these are zones however, we probably wat to avoid the
kbd_backlight suffix of the name, otherwise upower will
pick the first device it enumerates and control that, while
leaving the other zones alone, which is not what we want.

Regards,

Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help