linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	Darren Hart <dvhart@infradead.org>,
	ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Fabio D'Urso" <fabiodurso@hotmail.it>
Subject: Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight
Date: Mon, 4 Jan 2016 21:40:01 +0100	[thread overview]
Message-ID: <201601042140.02085@pali> (raw)
In-Reply-To: <201601042123.52524@pali>

[-- Attachment #1: Type: Text/Plain, Size: 959 bytes --]

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@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2016-01-04 20:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 18:46 [PATCH] thinkpad_acpi: Add support for keyboard backlight Pali Rohár
2015-12-27 23:14 ` Henrique de Moraes Holschuh
2015-12-28 14:48   ` Pali Rohár
2015-12-30 22:28     ` Pali Rohár
2016-01-06  8:45       ` Pali Rohár
2016-01-09 17:36         ` Henrique de Moraes Holschuh
2015-12-30 22:27 ` [PATCH v2] " Pali Rohár
2016-01-04 20:04   ` Darren Hart
2016-01-04 20:26     ` Pali Rohár
2016-01-04 20:40       ` Darren Hart
2016-01-04 20:51         ` Pali Rohár
2016-01-04 21:42           ` Darren Hart
2016-01-09 17:34         ` Henrique de Moraes Holschuh
2016-01-04 20:12 ` [PATCH] " Pavel Machek
2016-01-04 20:23   ` Pali Rohár
2016-01-04 20:40     ` Pali Rohár [this message]
2016-01-09 17:39   ` Henrique de Moraes Holschuh
2016-01-09 17:46     ` Henrique de Moraes Holschuh
2016-01-11 19:04       ` Darren Hart
2016-01-11 19:28         ` Henrique de Moraes Holschuh
2016-01-11 20:03           ` Pali Rohár
2016-01-11 21:12             ` Johannes Stezenbach
2016-01-12 16:07               ` Henrique de Moraes Holschuh
2016-01-12 16:23                 ` [ibm-acpi-devel] " Yves-Alexis Perez
2016-01-12 16:35                 ` Johannes Stezenbach
2016-01-12 17:56                   ` Henrique de Moraes Holschuh
2016-01-12 22:07                     ` Johannes Stezenbach
2016-01-12 18:11                 ` [ibm-acpi-devel] " Kevin Locke
2016-01-12 18:20                   ` Henrique de Moraes Holschuh
2016-01-12 18:36                     ` Kevin Locke
2016-01-12 16:04             ` Henrique de Moraes Holschuh
2016-01-12 21:58             ` Pavel Machek
2016-01-13  8:54               ` Pali Rohár
2016-01-13 19:07                 ` Pavel Machek
2016-01-13 19:10                   ` Pavel Machek
2016-01-21  8:57                     ` Pali Rohár
2016-01-11 22:44           ` [ibm-acpi-devel] " Yves-Alexis Perez
2016-01-12 16:59           ` Darren Hart
2016-01-12 17:51             ` Henrique de Moraes Holschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201601042140.02085@pali \
    --to=pali.rohar@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=fabiodurso@hotmail.it \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).