linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Rob Herring <robh@kernel.org>, Dan Murphy <dmurphy@ti.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	devicetree@vger.kernel.org,
	Linux LED Subsystem <linux-leds@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/9] dt: bindings: Add multicolor class dt bindings documention
Date: Tue, 18 Jun 2019 20:19:57 +0200	[thread overview]
Message-ID: <afc7f11f-7f8d-7680-aef3-58c26e8b34fa@gmail.com> (raw)
In-Reply-To: <CAL_JsqK7u1xXNmwtHjUd7Z5ewHd9_d51quH4zMXxEd63egd28w@mail.gmail.com>

On 6/18/19 5:36 PM, Rob Herring wrote:
> On Fri, Jun 14, 2019 at 11:18 AM Dan Murphy <dmurphy@ti.com> wrote:
>>
>> Rob
>>
>> Thanks for the review
>>
>> On 6/14/19 12:00 PM, Rob Herring wrote:
>>> On Thu, May 23, 2019 at 02:08:13PM -0500, Dan Murphy wrote:
>>>> Add DT bindings for the LEDs multicolor class framework.
>>>>
>>>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>>>> ---
>>>>    .../bindings/leds/leds-class-multicolor.txt   | 97 +++++++++++++++++++
>>>>    1 file changed, 97 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/leds/leds-class-multicolor.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt b/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt
>>>> new file mode 100644
>>>> index 000000000000..e2a2ce3279cb
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt
>>>> @@ -0,0 +1,97 @@
>>>> +* Multicolor LED properties
>>>> +
>>>> +Multicolor LEDs can consist of a RGB, RGBW or a RGBA LED clusters.  These devices
>>>> +can be grouped together and also provide a modeling mechanism so that the
>>>> +cluster LEDs can vary in hue and intensity to produce a wide range of colors.
>>>> +
>>>> +The nodes and properties defined in this document are unique to the multicolor
>>>> +LED class.  Common LED nodes and properties are inherited from the common.txt
>>>> +within this documentation directory.
>>>> +
>>>> +Required LED Child properties:
>>>> +    - color : For multicolor LED support this property should be defined as
>>>> +              LED_COLOR_ID_MULTI and further definition can be found in
>>>> +              include/linux/leds/common.h.
>>>> +
>>>> +led-controller@30 {
>>>> +    #address-cells = <1>;
>>>> +    #size-cells = <0>;
>>>> +    compatible = "ti,lp5024";
>>>> +    reg = <0x29>;
>>>> +
>>>> +    multi-led@4 {
>>> Typically we sort by address order.
>>
>> These are not addresses these end up being the "module" number that the
>> LEDs below are associated to.
> 
> 'reg' (and the unit-address) is an address in the sense that is how
> you identify a device or sub-device. It doesn't matter what type of
> 'address' it is, DT practice is to sort node in unit-address numerical
> order.
> 
> 'module' is a h/w thing, right? A bank or instance within the device?
> If not, using 'reg' here is not appropriate.

In this case reg represents LEDn_BRIGHTNESS register which controls
a group of three LEDs. The thing is that those registers' addresses
start from 0x07, i.e. the formula for calculating the RGB LED module
address is: LEDn_BRIGHTNESS = 0x07 + n.

 From the above it seems that we should have multi-led@7 and reg = 0x07
for LED0_BRIGHTNESS register governing the brightness of RGB LED
module 0, right?

And regarding sorting by address order I think that Rob was asking for
placing whole multi-led@4 sub-node after multi-led@2 (here sticking to
the numeration from the patch).

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2019-06-18 18:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 19:08 [PATCH v3 0/9] Multicolor Framework update Dan Murphy
2019-05-23 19:08 ` [PATCH v3 1/9] leds: multicolor: Add sysfs interface definition Dan Murphy
2019-05-27 10:33   ` Pavel Machek
2019-05-28  0:45     ` Dan Murphy
2019-05-28 11:34       ` Dan Murphy
2019-05-30 19:40         ` Pavel Machek
2019-05-30 20:43           ` Dan Murphy
2019-05-27 20:00   ` Jacek Anaszewski
2019-05-28 17:32     ` Dan Murphy
2019-05-28 17:44       ` Jacek Anaszewski
2019-05-28 18:19         ` Dan Murphy
2019-05-28 18:29           ` Jacek Anaszewski
2019-05-30 14:30             ` Dan Murphy
2019-05-23 19:08 ` [PATCH v3 2/9] dt: bindings: Add multicolor class dt bindings documention Dan Murphy
2019-06-14 17:00   ` Rob Herring
2019-06-14 17:18     ` Dan Murphy
2019-06-18 15:36       ` Rob Herring
2019-06-18 18:19         ` Jacek Anaszewski [this message]
2019-06-18 18:57           ` Rob Herring
2019-05-23 19:08 ` [PATCH v3 3/9] documention: leds: Add multicolor class documentation Dan Murphy
2019-05-23 19:08 ` [PATCH v3 4/9] dt-bindings: leds: Add multicolor ID to the color ID list Dan Murphy
2019-06-14 17:00   ` Rob Herring
2019-05-23 19:08 ` [PATCH v3 5/9] " Dan Murphy
2019-05-23 19:08 ` [PATCH v3 6/9] leds: multicolor: Introduce a multicolor class definition Dan Murphy
2019-06-20 16:10   ` Jacek Anaszewski
2019-06-20 20:06     ` Dan Murphy
2019-06-20 21:42       ` Jacek Anaszewski
2019-05-23 19:08 ` [PATCH v3 7/9] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2019-05-24 20:50   ` Rob Herring
2019-05-28  0:47     ` Dan Murphy
2019-06-11 21:51   ` Rob Herring
2019-05-23 19:08 ` [PATCH v3 8/9] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2019-05-23 19:08 ` [PATCH v3 9/9] leds: Update the lp55xx to use the multi color framework Dan Murphy
2019-06-14  7:02 ` [PATCH v3 0/9] Multicolor Framework update Alexander Dahl
2019-06-14 14:23   ` Dan Murphy
2019-06-16 15:49   ` Pavel Machek
2019-06-17 13:47     ` 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=afc7f11f-7f8d-7680-aef3-58c26e8b34fa@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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).