Re: [PATCH 2/2] dt-bindings: leds: Add aw21024 binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux