dt-bindings: pwm: restrict node name suffixes
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 30 May 2023 14:48:46 +0000 (16:48 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 23 Jun 2023 13:44:51 +0000 (15:44 +0200)
Make the pattern matching node names a bit stricter to improve DTS
consistency.  The pattern is restricted to:
1. Only one unit address or one -N suffix,
2. -N suffixes to decimal numbers.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Documentation/devicetree/bindings/pwm/pwm.yaml

index 3c01f85..abd9fa8 100644 (file)
@@ -13,7 +13,7 @@ select: false
 
 properties:
   $nodename:
-    pattern: "^pwm(@.*|-[0-9a-f])*$"
+    pattern: "^pwm(@.*|-([0-9]|[1-9][0-9]+))?$"
 
   "#pwm-cells":
     description: