[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201601042140.02085@pali>
Date: Mon, 4 Jan 2016 21:40:01 +0100
From: Pali Rohár <pali.rohar@...il.com>
To: Pavel Machek <pavel@....cz>
Cc: Henrique de Moraes Holschuh <ibm-acpi@....eng.br>,
Darren Hart <dvhart@...radead.org>,
ibm-acpi-devel@...ts.sourceforge.net,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
"Fabio D'Urso" <fabiodurso@...mail.it>
Subject: Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight
On Monday 04 January 2016 21:23:52 Pali Rohár wrote:
> Looks like userspace already uses /sys/class/leds/*::kbd_backlight
> for keyboard backlight (light under the keyboard). At least other
> drivers uses this name and my KDE desktop recognized
> "dell::kbd_backlight" (from dell-laptop.ko) and
> "tpacpi::kbd_backlight" too.
>
> So really for keyboard backlight use *::kbd_backlight it is already
> handled by existing userspace applications.
upower is one of tool used on linux desktops. See this source code:
http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c
It has function up_kbd_backlight_find() which do:
/* find a led device that is a keyboard device */
while ((filename = g_dir_read_name (dir)) != NULL) {
if (g_strstr_len (filename, -1, "kbd_backlight") != NULL) {
dir_path = g_build_filename ("/sys/class/leds",
filename, NULL);
break;
}
}
--
Pali Rohár
pali.rohar@...il.com
Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists