linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: robh@kernel.org, pavel@ucw.cz, sakari.ailus@iki.fi,
	dmurphy@ti.com, jacek.anaszewski@gmail.com
Subject: [PATCH/RFC] DT: leds: Fix 'label' property description and add 'colour' property
Date: Sat,  2 Dec 2017 22:50:10 +0100	[thread overview]
Message-ID: <1512251410-6084-1-git-send-email-jacek.anaszewski@gmail.com> (raw)

Label property was imposed a uniqueness requirement, which was erroneous,
since ePAPR defines it to "a human readable string describing a device".

Also the binding description misleadingly suggested direct usage of label
for LED class device name, whereas it should only define a LED function.

Therefore an additional 'colour' property is being introduced, which together
with the parent DT node name used for devicename shall be used for naming LED
class device according to the patterh <devicename>:<colour>:<function>.

Fixes: 116b8e164116 ("DT: leds: Add uniqueness requirement for 'label' property")
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
---
 Documentation/devicetree/bindings/leds/common.txt | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
index 1d4afe9..16973ee 100644
--- a/Documentation/devicetree/bindings/leds/common.txt
+++ b/Documentation/devicetree/bindings/leds/common.txt
@@ -14,10 +14,9 @@ Optional properties for child nodes:
 - led-sources : List of device current outputs the LED is connected to. The
 		outputs are identified by the numbers that must be defined
 		in the LED device binding documentation.
-- label : The label for this LED. If omitted, the label is taken from the node
-	  name (excluding the unit address). It has to uniquely identify
-	  a device, i.e. no other LED class device can be assigned the same
-	  label.
+- label : The label for this LED. It should describe its function. If omitted,
+          the label is taken from the node name (excluding the unit address).
+- colour : Colour of the LED.
 
 - default-state : The initial state of the LED. Valid values are "on", "off",
   and "keep". If the LED is already on or off and the default-state property is
-- 
2.1.4

             reply	other threads:[~2017-12-02 21:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-02 21:50 Jacek Anaszewski [this message]
2017-12-04 10:43 ` [PATCH/RFC] DT: leds: Fix 'label' property description and add 'colour' property Pavel Machek
2017-12-05 19:52   ` Jacek Anaszewski
2017-12-11 16:27   ` Rob Herring
2017-12-14 21:35     ` Jacek Anaszewski
     [not found]       ` <82dc0ed3-f4fe-d8a2-65ea-4212770b78e7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-17 12:49         ` Jacek Anaszewski
2018-03-02 12:51       ` Pavel Machek
2017-12-08 16:01 ` Dan Murphy

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=1512251410-6084-1-git-send-email-jacek.anaszewski@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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).