All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Dan Murphy <dmurphy@ti.com>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Sven Schwermer <sven.schwermer@disruptive-technologies.com>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Kyle Swenson <kyle.swenson@est.tech>
Subject: Re: [PATCH 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example
Date: Tue, 24 May 2022 08:36:10 +0200	[thread overview]
Message-ID: <0d48b3fa-d6db-68d8-93a0-79902a119735@linaro.org> (raw)
In-Reply-To: <20220523213528.GA2227380-robh@kernel.org>

On 23/05/2022 23:35, Rob Herring wrote:
> On Wed, May 18, 2022 at 10:22:14AM +0200, Krzysztof Kozlowski wrote:
>> The multi-led node defined address/size cells, so it intended to have
>> children with unit addresses.
>>
>> The second multi-led's reg property defined three LED indexes within one
>> reg item, which is not correct - these are three separate items.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Cc: Kyle Swenson <kyle.swenson@est.tech>
>> ---
>>  .../devicetree/bindings/leds/leds-lp50xx.yaml | 22 ++++++++++++-------
>>  1 file changed, 14 insertions(+), 8 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
>> index f12fe5b53f30..dc1ac905bb91 100644
>> --- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
>> +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
>> @@ -99,35 +99,41 @@ examples:
>>                 color = <LED_COLOR_ID_RGB>;
>>                 function = LED_FUNCTION_CHARGING;
>>  
>> -               led-0 {
>> +               led@0 {
>> +                   reg = <0x0>;
>>                     color = <LED_COLOR_ID_RED>;
>>                 };
>>  
>> -               led-1 {
>> +               led@1 {
>> +                   reg = <0x1>;
>>                     color = <LED_COLOR_ID_GREEN>;
>>                 };
>>  
>> -               led-2 {
>> +               led@2 {
>> +                   reg = <0x2>;
>>                     color = <LED_COLOR_ID_BLUE>;
>>                 };
>>            };
>>  
>>            multi-led@2 {
>>              #address-cells = <1>;
>> -            #size-cells = <2>;
>> -            reg = <0x2 0x3 0x5>;
>> +            #size-cells = <0>;
>> +            reg = <0x3>, <0x4>, <0x5>;
> 
> The unit-address is 2, but the reg value is 3?

Right, the multi-led should be also @3 to match the reg and first led in
children.

Thanks.


Best regards,
Krzysztof

      reply	other threads:[~2022-05-24  6:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  8:22 [PATCH 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
2022-05-18  8:22 ` [PATCH 2/2] dt-bindings: leds: fix indentation in examples Krzysztof Kozlowski
2022-05-23 21:35 ` [PATCH 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Rob Herring
2022-05-24  6:36   ` Krzysztof Kozlowski [this message]

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=0d48b3fa-d6db-68d8-93a0-79902a119735@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kyle.swenson@est.tech \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=sven.schwermer@disruptive-technologies.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.