devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Rob Herring <robh@kernel.org>, Oleh Kravchenko <oleg@kaa.org.ua>,
	devicetree@vger.kernel.org,
	Linux LED Subsystem <linux-leds@vger.kernel.org>
Subject: Re: Standardized LED function names [was: Re: [PATCH v3] leds: add LED driver for CR0014114 board]
Date: Sun, 15 Apr 2018 18:15:41 +0200	[thread overview]
Message-ID: <20180415161541.GE10802@amd> (raw)
In-Reply-To: <486709a4-027a-8995-7d6f-217d3d029786@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1895 bytes --]

Hi!

> >> A case I care about is I have a family of boards that all have a
> >> common defined set of 4 LEDs. They could be driven by anything, but I
> >> want the same interface presented to userspace across boards.
> >> "
> > 
> > Yes, and "label" should provide me with that ability as the context
> > was the practice of putting the controller name in the label.
> 
> Exactly. There are two options:
> 
> 1.
> - label format : "<color>:<function"
> 2.
> - label format : "<function>"
> - new "color" DT property

We should provide compatibility here.

So we should really have new "color" property, and probably new
"function" property, too.

> The changes in dts files would have to be accompanied by changes in
> DT parsing part of LED class drivers. Also, I wonder if it wouldn't
> make sense to add config option to choose between old and new LED
> naming convention to avoid userspace breakage.

Both old and new kernels are expected to be working with both old and
new dts...

And having config option choosing userland interfaces would not be nice.

> It would allow to use dts files with old style labels with
> newer kernels. The LED class device names would differ like below:
> 
> Old style name (current):
> 	/sys/class/leds/netxbig:red:power
> 
> New style name:
> 	/sys/class/leds/red:power (we could also think of dropping
>                                    color from name and adding sysfs
>                                    file for it)

I believe color needs to stay: it is common to have "green:battery"
for "battery ok" and "yellow:battery" for charging, for
example. Notification LED has three channels, "red", "green",
"blue"...

Thanks for looking into this,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2018-04-15 16:15 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <026d9ec2-f2bd-18b9-d5fa-f593d40e2f57@kaa.org.ua>
2018-03-12 15:33 ` [PATCH] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-12 15:45   ` Peter Meerwald-Stadler
2018-03-12 15:54     ` Oleh Kravchenko
2018-03-17  8:19   ` Jacek Anaszewski
2018-03-12 15:58 ` [PATCH v2] " Oleh Kravchenko
2018-03-13 12:45   ` [PATCH v3] " Oleh Kravchenko
2018-03-16 21:14     ` Pavel Machek
2018-03-16 21:29       ` Oleh Kravchenko
2018-03-16 21:33         ` Pavel Machek
2018-03-16 21:40           ` Oleh Kravchenko
2018-03-16 22:10             ` Pavel Machek
2018-03-26 12:15             ` [PATCH v4 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Oleh Kravchenko
2018-03-26 12:15               ` [PATCH v4 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-27 16:14               ` [PATCH v4 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Rob Herring
2018-03-27 16:49               ` [PATCH " Oleh Kravchenko
2018-03-27 16:49                 ` [PATCH 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-27 20:58                   ` Jacek Anaszewski
2018-03-28  6:53                   ` [PATCH v6 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Oleh Kravchenko
2018-03-28  6:53                     ` [PATCH v6 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-28 15:43                     ` [PATCH v6 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Rob Herring
2018-03-28 18:56                     ` [PATCH v7 " Oleh Kravchenko
2018-03-28 18:56                       ` [PATCH v7 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-04-02 12:53                         ` [PATCH v8 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Oleh Kravchenko
2018-04-02 12:53                           ` [PATCH v8 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-04-03 10:48                             ` Pavel Machek
2018-04-10 18:59                             ` Jacek Anaszewski
2018-04-10 20:24                               ` Oleh Kravchenko
2018-04-09 19:18                           ` [PATCH v8 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Jacek Anaszewski
2018-04-09 21:10                           ` Rob Herring
2018-03-27 20:58                 ` [PATCH " Jacek Anaszewski
2018-03-28  6:36                   ` Oleh Kravchenko
2018-03-28 19:21                     ` Jacek Anaszewski
2018-03-28 19:48                       ` Oleh Kravchenko
2018-03-28 20:23                         ` Jacek Anaszewski
2018-03-29 18:56                           ` Oleh Kravchenko
2018-03-30 10:10                             ` Jacek Anaszewski
2018-03-18 12:49     ` [PATCH v3] leds: add LED driver for CR0014114 board Rob Herring
2018-03-18 20:03       ` Jacek Anaszewski
2018-03-18 23:38         ` Rob Herring
2018-03-19 21:18           ` Standardized LED function names [was: Re: [PATCH v3] leds: add LED driver for CR0014114 board] Jacek Anaszewski
2018-03-27 15:31             ` Rob Herring
2018-03-30 10:53               ` Jacek Anaszewski
2018-03-30 20:59                 ` Rob Herring
2018-04-15 16:15                 ` Pavel Machek [this message]
2018-04-15 18:30                   ` Jacek Anaszewski
2018-04-15 16:15             ` Pavel Machek

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=20180415161541.GE10802@amd \
    --to=pavel@ucw.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=oleg@kaa.org.ua \
    --cc=robh@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).