From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759054AbcAUI5n (ORCPT ); Thu, 21 Jan 2016 03:57:43 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:34286 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbcAUI5j (ORCPT ); Thu, 21 Jan 2016 03:57:39 -0500 Date: Thu, 21 Jan 2016 09:57:36 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Pavel Machek Cc: Henrique de Moraes Holschuh , Darren Hart , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, "Fabio D'Urso" Subject: Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Message-ID: <20160121085736.GP7192@pali> References: <1450982818-11694-1-git-send-email-pali.rohar@gmail.com> <20160111190411.GE10643@malice.jf.intel.com> <1452540480.2848000.489039714.26068C20@webmail.messagingengine.com> <201601112103.01145@pali> <20160112215804.GA12869@amd> <20160113085455.GD11560@pali> <20160113190736.GD9821@amd> <20160113191030.GE9821@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160113191030.GE9821@amd> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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