From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Oleh Kravchenko <oleg@kaa.org.ua>,
devicetree@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: Add vendor prefix and docs for CR0014114
Date: Wed, 28 Mar 2018 21:21:04 +0200 [thread overview]
Message-ID: <83ebdd21-ed70-666d-0d20-093ff52a208b@gmail.com> (raw)
In-Reply-To: <005611b1-b821-93d2-4bb5-c3f12b4fc937@kaa.org.ua>
On 03/28/2018 08:36 AM, Oleh Kravchenko wrote:
> Hello Jacek,
>
> On 27.03.18 23:58, Jacek Anaszewski wrote:
>>> +Example
>>> +-------
>>> +
>>> +led-controller@0 {
>>> + compatible = "crane,cr0014114";
>>> + reg = <0>;
>>> + spi-max-frequency = <50000>;
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> +
>>> + led@0 {
>>> + reg = <0>;
>>> + label = "cr0:red:coin";
>>> + };
>>> + led@1 {
>>> + reg = <1>;
>>> + label = "cr0:green:coin";
>>> + };
>>> + led@2 {
>>> + reg = <2>;
>>> + label = "cr0:blue:coin";
>>> + };
>>> + led@3 {
>>> + reg = <3>;
>>> + label = "cr1:red:bill";
>>> + };
>>> + led@4 {
>>> + reg = <4>;
>>> + label = "cr1:green:bill";
>>> + };
>>> + led@5 {
>>> + reg = <5>;
>>> + label = "cr1:blue:bill";
>>> + };
>>
>> Why cr0 and cr1? It should be cr0014114 to stick to the
>> current LED naming pattern <devicename:colour:function>.
>>
>> Nonetheless, we lately came to the conclusion that devicename
>> segment is redundant in LED class device name, so until we change
>> LED naming convention officially, let's remove devicename segment
>> at least from DT and prepend the label with "cr0014114" in the driver.
>>
>> Please compare how it is approached in [0] (not merged yet).
>>
>
> It's just example.
> But anyway our applications works with LEDs by numbers.
>
> Using function names instead numbers will increase code complexity,
> so we use numbers :)
This is LED class device naming convention in mainline and examples
also must stick to it to keep the things consistent.
Please switch labels so that they matched the pattern
label = "color:function";
Regardless of how LEDs are named in your port of kernel,
they for sure have some functions for the vending machine
user. Just use those names in DT :-)
Best regards,
Jacek Anaszewski
>>> +};
>>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>> index ae850d6c0ad3..f17949c365f5 100644
>>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>> @@ -75,6 +75,7 @@ cnxt Conexant Systems, Inc.
>>> compulab CompuLab Ltd.
>>> cortina Cortina Systems, Inc.
>>> cosmic Cosmic Circuits
>>> +crane Crane Connectivity Solutions
>>> creative Creative Technology Ltd
>>> crystalfontz Crystalfontz America, Inc.
>>> cubietech Cubietech, Ltd.
>>>
>>
>> [0] https://www.spinics.net/lists/devicetree/msg220561.html
>>
>
next prev parent reply other threads:[~2018-03-28 19:22 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 [this message]
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
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=83ebdd21-ed70-666d-0d20-093ff52a208b@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=oleg@kaa.org.ua \
/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).