Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314012

Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight

From Pali Rohár <pali.rohar@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight
Date 2016-01-21 10:00 +0100
Message-ID <qTjfY-2QP-11@gated-at.bofh.it> (permalink)
References (3 earlier) <qPQWT-7fk-19@gated-at.bofh.it> <qQf8T-6R1-21@gated-at.bofh.it> <qQprA-5DL-5@gated-at.bofh.it> <qQyXU-41l-27@gated-at.bofh.it> <qQz7A-44Y-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wednesday 13 January 2016 20:10:30 Pavel Machek wrote:
> On Wed 2016-01-13 20:07:36, Pavel Machek wrote:
> > On Wed 2016-01-13 09:54:55, Pali Rohár wrote:
> > > On Tuesday 12 January 2016 22:58:04 Pavel Machek wrote:
> > > > Hi!
> > > > 
> 
> > > > Next question is.. apparently there are some keyboards that have
> > > > per-key RGB backlight... but maybe we can just call that "weird
> > > > enough" and ignore...
> > > 
> > > First we need to defines stable kernel ABI for keyboard backlight. And I
> > > suggest to use existing convention used by upower/console-kit and other
> > > userspace apps...
> > 
> > Hmm... I'm not sure that can be done. What were the masks used by
> > upower again? Will upower write to all 6 leds if we present them?
> 
> Got it...
> 
> 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;
> 								
> That suggests that it stops at the first matching device. Adding new
> "virtual" led controlling 6 physical leds would be ugly. So... new
> interface should be done.
> 
> 								Pavel

Yes, it would be ugly, but lp5523 is already ugly... it can accept
numeric value, trigger and also program in bytecode either via sysfs or
via request_firmware... Another virtual led control should not be
problem for this :-)

-- 
Pali Rohár
pali.rohar@gmail.com

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pali Rohár <pali.rohar@gmail.com> - 2016-01-21 10:00 +0100

csiph-web