Re: [PATCH v3 2/4] dt-bindings: leds: nxp,pca963x: add multicolor LED support

From: Conor Dooley

Date: Tue Jul 07 2026 - 12:23:57 EST


On Tue, Jul 07, 2026 at 11:03:44AM +0200, Loic Poulain wrote:
> > > + "^multi-led@[0-9a-f]+$":
> > > + patternProperties:
> > > + "^led@[0-9a-f]+$":
> > > + properties:
> > > + reg:
> > > + maximum: 15
> >
> > Is this 15 the maximum for all devices?
>
> 15 is the hardware max for pca9635, and serves as the default for any
> future/unlisted compatible via the else branch. Per your comment
> above, I'll move it into the non-conditional block so it's enforced
> unconditionally instead of only through else.
>
> > If so, why does your regex permit values greater than 15?
>
> The unit-address regex only validates that the name is well-formed
> hex, and not the numeric bound. DT convention requires the unit
> address to equal the node's reg value in hex, so in practice this is
> limited to 15.
> This is again a copy of what the yaml already describes for other
> device's constraints. However, I can tighten the regex itself instead
> if you'd prefer that approach, but that would make the yaml a bit
> inconsistent.

I don't see any value in the regexes permitting things that are not
possible with the hardware. The + should probably be trimmed from the
existing regexes IMO.

Attachment: signature.asc
Description: PGP signature