From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard backlight name Date: Thu, 4 Apr 2019 13:26:35 -0700 Message-ID: References: <20190404185919.GB27340@amd> <20190404191931.GA29984@amd> <20190404200658.GD29984@amd> <20190404202042.GF29984@amd> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20190404202042.GF29984@amd> Sender: linux-kernel-owner@vger.kernel.org To: Pavel Machek Cc: Nick Crews , Guenter Roeck , Enric Balletbo i Serra , Benson Leung , linux-leds@vger.kernel.org, Jacek Anaszewski , Alexandre Belloni , Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel , Duncan Laurie , Simon Glass List-Id: linux-leds@vger.kernel.org On Thu, Apr 4, 2019 at 1:20 PM Pavel Machek wrote: > > On Thu 2019-04-04 13:13:34, Dmitry Torokhov wrote: > > On Thu, Apr 4, 2019 at 1:06 PM Pavel Machek wrote: > > > > > > Hi! > > > > > > > > > It is *function* and maybe color that userspace is interested i= n, and > > > > > > here we have proper standardization in form of "kbd_backlight".= Device > > > > > > name is, well, device name. It should uniquely identify the dev= ice led > > > > > > is attached to, but otherwise is rarely interesting. If userspa= ce is > > > > > > really concerned what kind of keyboard backlight it is it shoul= d > > > > > > investigate parent device(s) and see what they end up with. > > > > > > > > > > That does not work. Userspace wants to know if it is internal key= board > > > > > or USB keyboard, not what kind of i2c controller the LED is conne= cted > > > > > to. > > > > > > > > Why does userspace want to know it? > > > > > > For example to turn off backlight on internal keyboard when the lid i= s closed. > > > > Would you not want to turn off external as well? > > Not really. If I'm using machine with lid closed, external monitor and > USB keyboard attached, I want to control backlight of USB keyboard, > but backlight of internal keyboard can stay off. > > > And what to do if internal keyboard is not platform but USB? Like > > Google "Whiskers"? (I am not sure why you decided to drop my mention > > of internal USB keyboards completely off your reply). > > I don't have answers for everything. Even if you have USB keyboard, you'l= l > likely still have backlight connected to embedded controller. If not, > then maybe you have exception userland needs to know about. > > Still better than making everything an exception. You do not need to make everything exception. You just need to look beyond the name, and see how the device is connected. And then apply your exceptions for "weird" devices. > > > > > > grep for platform::mic_mute . > > > > > > > > > > (And platform is even pretty good match for how the LED is connec= ted > > > > > in your case). > > > > > > > > Until we get a secondary interface that is also "platform"... > > > > > > How would that happen? > > > > It won't happen on Wilco, but you can't imagine that several blocks > > get reused in the same device and they end up clashing? > > In the end, there will be just one internal keyboard backlight, right? =C2=AF\_(=E3=83=84)_/=C2=AF Maybe. Maybe not. Who knows what HW designers w= ill come up with. Thanks. --=20 Dmitry