Re: [PATCH v3 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]

 



* Rob Herring <robh@xxxxxxxxxx> [221123 02:31]:
> On Tue, Nov 22, 2022 at 02:32: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>.
> > 
> > Let's use an improved match suggested by Krzysztof Kozlowski
> > <krzysztof.kozlowski@xxxxxxxxxx> and improved a bit by Uwe Kleine-König
> > <u.kleine-koenig@xxxxxxxxxxxxxx>.
> > 
> > Cc: linux-pwm@xxxxxxxxxxxxxxx
> > Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> > Suggested-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> > Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> > ---
> > 
> > Changes since v2:
> > 
> > - Use pattern suggested by Krzysztof and Uwe
> > 
> > Changes since v1:
> > 
> > - New patch added to deal with pwm-omap-dmtimer binding
> > 
> > ---
> >  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]+)?$"
> 
> So now pwm-10 could be either?

Yes.

> I'm fine with decimal, but can we do that everywhere we do this -N 
> naming?

Do you mean the '[0-9a-f]' users that don't use '[0-9af]+'?

These can be found with:

$ find Documentation/devicetree/bindings/ -name \*.yaml | \
	xargs grep pattern: | grep '\[0-9a-f\]' | grep -v '\[0-9a-f\]+'

Not sure if some of these need to intentionally limit the node numbering
to 15.

If you have some other criteria in mind, let me know :)

That sounds like a separate patch though.

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