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

Conor Dooley <[email protected]>
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <20260707-spoken-anemia-68fb54a6ab34@spud>
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.
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCak0nBgAKCRB4tDGHoIJi
0oGuAPwIlUU6nZvmDo3hOAwp6hWklBGrOjVFR3rsxGvoK3GMvwD+P6VMD80XnmH9
dgvz6wHIaSdmzAIz9sNj2yqz4sdzMAE=
=j/LD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.