Re: [PATCH v2 1/2] dt-bindings: pwm: Allow decimal format in addition to hex format

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

 



* Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> [221121 14:30]:
> On Mon, Nov 21, 2022 at 01:55:24PM +0200, Tony Lindgren wrote:
> > Let's allow node numbering in decimal format too.
> > 
> > Simple human-readable increments/IDs are usually decimal, hex is only for
> > addresses as noted by Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>.
> > 
> > Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
> > Cc: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> > Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> > ---
> >  Documentation/devicetree/bindings/pwm/pwm.yaml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/pwm.yaml b/Documentation/devicetree/bindings/pwm/pwm.yaml
> > --- a/Documentation/devicetree/bindings/pwm/pwm.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/pwm.yaml
> > @@ -13,7 +13,7 @@ select: false
> >  
> >  properties:
> >    $nodename:
> > -    pattern: "^pwm(@.*|-[0-9a-f])*$"
> > +    pattern: "^pwm(@.*|-([0-9a-f]|1[0-5]))*$"
> 
> I wonder why you don't make this:
> 
> +    pattern: "^pwm(@.*|-[0-9a-f]*)$"

Hmm but I think this would also pass for node names like pwm-a-foo?

I just used the following to look for similar examples FYI:

$ find Documentation/devicetree/bindings/ -name \*.yaml | \
	xargs grep pattern: | grep '1\[0-'

> Is there a use case to match
> 
> 	pwm-1-2-3-4-5

I don't think so.

Regards,

Tony




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux