Re: [PATCH v7 2/4] dt-bindings: leds: nxp,pca963x: add multicolor LED support
Loic Poulain <[email protected]> Mon, 27 Jul 2026 10:24:32 +0200
| Newsgroups | org.kernel.vger.linux-leds,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAFEp6-1Rciv1qqsYeHLnxKPKXos+hP3FUkgRjXzrTzHDA5cMDg@mail.gmail.com> |
Hi Krzysztof, On Mon, Jul 27, 2026 at 8:22=E2=80=AFAM Krzysztof Kozlowski <[email protected]= g> wrote: > > On Fri, Jul 24, 2026 at 09:48:16AM +0200, Loic Poulain wrote: > > then: > > patternProperties: > > - "^led@[0-9a-f]+$": > > + "^.*led@[0-9a-f]$": > > properties: > > reg: > > maximum: 3 > > + "^multi-led@[0-9a-f]$": > > + patternProperties: > > + "^led@[0-9a-f]$": > > + properties: > > + reg: > > + maximum: 3 > > - if: > > properties: > > compatible: > > @@ -96,10 +136,16 @@ allOf: > > - nxp,pca9634 > > then: > > patternProperties: > > - "^led@[0-9a-f]+$": > > + "^.*led@[0-9a-f]$": > > Why changing this? multi-led is below, so maybe you wanted to combine > both? Yes, I wanted to combine them so that both multi-led@ and led@ nodes have their reg property checked by this filter, while the multi-led@ filter below only checks the reg property of its led@ subnodes, though it may not very clear and also too permissive? > > > properties: > > reg: > > maximum: 7 > > + "^multi-led@[0-9a-f]$": > > + patternProperties: > > + "^led@[0-9a-f]$": > > + properties: > > + reg: > > + maximum: 7 > > > > additionalProperties: false > > > > @@ -143,4 +189,50 @@ examples: > > }; > > }; > > > > + - | > > + #include <dt-bindings/leds/common.h> > > + > > + i2c { > > + #address-cells =3D <1>; > > + #size-cells =3D <0>; > > + > > + led-controller@62 { > > + compatible =3D "nxp,pca9633"; > > + reg =3D <0x62>; > > + #address-cells =3D <1>; > > + #size-cells =3D <0>; > > + > > + /* Three channels controlling one RGB LED */ > > + multi-led@0 { > > + reg =3D <0>; > > Messed indentation. ack. > > + color =3D <LED_COLOR_ID_RGB>; > > + function =3D LED_FUNCTION_STATUS; > > + #address-cells =3D <1>; > > + #size-cells =3D <0>; > > + > > + led@0 { > > + reg =3D <0>; > > + color =3D <LED_COLOR_ID_RED>; > > + }; > > + > > + led@1 { > > + reg =3D <1>; > > + color =3D <LED_COLOR_ID_GREEN>; > > + }; > > + > > + led@2 { > > + reg =3D <2>; > > + color =3D <LED_COLOR_ID_BLUE>; > > + }; > > + }; > > + > > + /* Remaining channel used as a plain white LED */ > > + led@3 { > > + reg =3D <3>; > > + color =3D <LED_COLOR_ID_WHITE>; > > + function =3D LED_FUNCTION_STATUS; > > + }; > > + }; > > + }; > > + > > ... > > > > -- > > 2.34.1 > >