linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Kyle Swenson <kyle.swenson@est.tech>,
	pavel@ucw.cz, robh+dt@kernel.org, krzk+dt@kernel.org
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: leds: Add aw21024 binding
Date: Wed, 18 May 2022 10:17:21 +0200	[thread overview]
Message-ID: <2c9b80ef-74c6-bd60-cfc9-d69349cdf6b1@linaro.org> (raw)
In-Reply-To: <YoPqDLMe+WYWKBxi@p620>

On 17/05/2022 20:31, Kyle Swenson wrote:
>>> +
>>> +            multi-led@1 {
>>> +                #address-cells = <1>;
>>> +                #size-cells = <2>;
>>> +                reg = <0x0 0x1 0x2>;
>>
>> This is confusing. Does not match unit address and address/size cells.
>> Perhaps you wanted three separate regs?
> The wrong address and size cells and not matching the unit address is a
> mistake on my part, and the next version will actually pass make
> dt_binding_check.
> 
> That said, it's not clear to me how best to handle a combination of
> multi-leds and individual LEDs on a particular board. For example, a
> particular board with this driver might have the first six outputs
> connected to two RGB LEDs, and then the remainder of the outputs
> connected to individual LEDs.
> 
> My (poor) attempt at handling this resulted in this approach where I
> (ab)used the 'reg' property to be able to address each individual LED of
> a multi-led.  I'm sure this problem has been solved before, but I'm
> struggling finding a driver in the tree that has solved it.
> 
> Any advice or pointers will be welcome, and in the mean time I'll plan
> on fixing the (now obvious) issues with the binding.  At the very least,
> cleaning up the binding will make the problem I'm trying to solve more
> clear.

The immediate solution to the DTS reg issue is to use the same unit
address, so:

multi-led@0 {
	reg = <0x0>, <0x1>, <0x2>;
}

However your case is partially (or entirely) covered by multicolor LEDs.
You should add allOf:$ref with reference to leds-class-multicolor.yaml.
I see exactly your pattern being used there - just the fixed one, I
think. I'll send a patch for it and put you on Cc.

Best regards,
Krzysztof

  reply	other threads:[~2022-05-18  8:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 19:04 [PATCH 1/2] leds: aw21024: Add support for Awinic's AW21024 Kyle Swenson
2022-05-13 19:04 ` [PATCH 2/2] dt-bindings: leds: Add aw21024 binding Kyle Swenson
2022-05-13 20:48   ` Rob Herring
2022-05-17  9:08   ` Krzysztof Kozlowski
2022-05-17 18:31     ` Kyle Swenson
2022-05-18  8:17       ` Krzysztof Kozlowski [this message]
2022-05-18 21:18         ` Kyle Swenson
2022-05-19  8:04           ` Krzysztof Kozlowski
2022-05-16 10:21 ` [PATCH 1/2] leds: aw21024: Add support for Awinic's AW21024 kernel test robot
2022-05-16 10:42 ` kernel test robot
2022-05-16 12:34 ` kernel test robot
2022-05-17  9:11 ` Krzysztof Kozlowski
2022-05-17 18:36   ` Kyle Swenson
2022-05-18  8:30     ` Krzysztof Kozlowski

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=2c9b80ef-74c6-bd60-cfc9-d69349cdf6b1@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kyle.swenson@est.tech \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@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).