All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <groeck@google.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Dmitry Torokhov <dtor@google.com>,
	Nick Crews <ncrews@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@chromium.org>,
	linux-leds@vger.kernel.org,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-rtc@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Duncan Laurie <dlaurie@chromium.org>,
	Simon Glass <sjg@google.com>
Subject: Re: [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard backlight name
Date: Thu, 4 Apr 2019 15:42:15 -0700	[thread overview]
Message-ID: <CABXOdTeQgjd2-T+eZCMdTDWBGLHEk6kvnYR0DjJYR7zuvVTMsQ@mail.gmail.com> (raw)
In-Reply-To: <20190404220509.GA14690@amd>

On Thu, Apr 4, 2019 at 3:05 PM Pavel Machek <pavel@ucw.cz> wrote:
>
> On Thu 2019-04-04 14:48:35, Dmitry Torokhov wrote:
> > On Thu, Apr 4, 2019 at 1:42 PM Pavel Machek <pavel@ucw.cz> wrote:
> > >
> > > Hi!
> > >
> > > > > > 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'll
> > > > > 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.
> > >
> > > "Where it is connected" is not interesting to the userland. "Is it
> > > backlight for internal keyboard" is the right question. It may be
> > > connected to embedded controller or some kind of controller over
> > > i2c... my shell scripts should not need to know about architecture of
> > > every notebook out there.
> >
> > Then your scripts will be failing for some setups.
>
> Well, yes. Do you want to guess what "lp5523:kb3" is?
>

Oh, please. The discussion is about the driver name part, which you
want to overload with some string to mean "internal", which in turn
is, if anything, part of the functionality.

With "platform", you'll at some point have two
"platform::kbd_backlight" entries. Remind me to send you a "told you
so" when that happens.

Guenter

> > > But I don't see why I should do additional work when its trivial for
> > > kernel to just name the LED in an useful way.
> > >
> > > "platform::kbd_backlight" has no disadvantages compared to
> > > "wilco::kbd_backlight" ... so lets just use it.
> >
> > It has disadvantages because it promises more than it can deliver IMO.
> > If device name != "platform::kbd_backlight" it does not mean that it
> > is not internal keyboard.
>
> My promise is if "platform::kbd_backlight" exists, it is backlight for
> internal keyboard. (And second half is "if it is easy for kernel, we
> name backlight for internal keyboard platform::kbd_backlight").
>
> > And you still have not resolved how you will
> > handle cases when there is more than one deice that can be considered
> > internal and may have a backlight.
>
> Is that realistic? How would that device look like?
>
>                                                                         Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2019-04-04 22:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 17:10 [PATCH v5 1/3] platform/chrome: wilco_ec: Standardize mailbox interface Nick Crews
2019-04-04 17:10 ` [PATCH v5 2/3] platform/chrome: Add Wilco EC keyboard backlight LEDs support Nick Crews
2019-04-04 19:52   ` Pavel Machek
2019-04-05 20:15   ` Guenter Roeck
2019-04-06  8:41     ` Pavel Machek
2019-04-07 21:46       ` Dmitry Torokhov
2019-04-07 22:18         ` Pavel Machek
2019-04-07 22:26           ` Dmitry Torokhov
2019-04-08  9:41             ` Keyboard backlight LED naming was " Pavel Machek
2019-04-08 13:31               ` Guenter Roeck
2019-04-04 17:10 ` [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard backlight name Nick Crews
2019-04-04 17:36   ` Guenter Roeck
2019-04-04 17:43     ` Dmitry Torokhov
2019-04-04 18:41       ` Nick Crews
2019-04-04 18:55         ` Dmitry Torokhov
2019-04-04 18:59           ` Pavel Machek
2019-04-04 19:05             ` Dmitry Torokhov
2019-04-04 19:19               ` Pavel Machek
2019-04-04 19:59                 ` Dmitry Torokhov
2019-04-04 20:06                   ` Pavel Machek
2019-04-04 20:13                     ` Dmitry Torokhov
2019-04-04 20:20                       ` Pavel Machek
2019-04-04 20:26                         ` Dmitry Torokhov
2019-04-04 20:42                           ` Pavel Machek
2019-04-04 21:48                             ` Dmitry Torokhov
2019-04-04 22:05                               ` Pavel Machek
2019-04-04 22:42                                 ` Guenter Roeck [this message]
2019-04-05  8:42                                   ` Enric Balletbo i Serra
2019-04-05 20:00                                     ` Jacek Anaszewski
2019-04-06  9:53                                       ` Pavel Machek
2019-04-06 14:15                                         ` Jacek Anaszewski
2019-04-06 22:17                                           ` Pavel Machek
2019-04-07 22:01                                       ` Dmitry Torokhov
2019-04-07 22:01                                         ` Dmitry Torokhov
2019-04-08 20:01                                         ` Jacek Anaszewski
2019-04-04 18:56         ` Pavel Machek
2019-04-08 23:58   ` Nick Crews

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=CABXOdTeQgjd2-T+eZCMdTDWBGLHEk6kvnYR0DjJYR7zuvVTMsQ@mail.gmail.com \
    --to=groeck@google.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bleung@chromium.org \
    --cc=dlaurie@chromium.org \
    --cc=dtor@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=ncrews@chromium.org \
    --cc=pavel@ucw.cz \
    --cc=sjg@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.