diff mbox series

dt-bindings: mux: restrict node name suffixes

Message ID 20240109082511.15278-1-krzysztof.kozlowski@linaro.org
State Accepted
Headers show
Series dt-bindings: mux: restrict node name suffixes | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Krzysztof Kozlowski Jan. 9, 2024, 8:25 a.m. UTC
Make the pattern matching node names a bit stricter to improve DTS
consistency.  The pattern is restricted to -N suffixes to decimal
numbers.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Some time ago I did such change treewide, but mux was left out:
https://lore.kernel.org/all/20230530144851.92059-1-krzysztof.kozlowski@linaro.org/
---
 Documentation/devicetree/bindings/mux/mux-controller.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Rosin Jan. 9, 2024, 3:23 p.m. UTC | #1
Hi!

2024-01-09 at 09:25, Krzysztof Kozlowski wrote:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency.  The pattern is restricted to -N suffixes to decimal
> numbers.

Maybe I'm confused, but how is that compatible with the hex I2C
address in Documentation/devicetree/bindings/mux/adi,adg792a.txt?

	&i2c0 {
		mux: mux-controller@50 {
			compatible = "adi,adg792a";

Cheers,
Peter
Peter Rosin Jan. 9, 2024, 3:32 p.m. UTC | #2
2024-01-09 at 16:23, Peter Rosin wrote:
> Hi!
> 
> 2024-01-09 at 09:25, Krzysztof Kozlowski wrote:
>> Make the pattern matching node names a bit stricter to improve DTS
>> consistency.  The pattern is restricted to -N suffixes to decimal
>> numbers.
> 
> Maybe I'm confused, but how is that compatible with the hex I2C
> address in Documentation/devicetree/bindings/mux/adi,adg792a.txt?
> 
> 	&i2c0 {
> 		mux: mux-controller@50 {
> 			compatible = "adi,adg792a";

I'm was indeed confused. The @-tail is .* and the decimal digits have
nothing to do with the address. Sorry for the noise...

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter
Rob Herring (Arm) Feb. 5, 2024, 4:15 p.m. UTC | #3
On Tue, 09 Jan 2024 09:25:11 +0100, Krzysztof Kozlowski wrote:
> Make the pattern matching node names a bit stricter to improve DTS
> consistency.  The pattern is restricted to -N suffixes to decimal
> numbers.
> 
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Some time ago I did such change treewide, but mux was left out:
> https://lore.kernel.org/all/20230530144851.92059-1-krzysztof.kozlowski@linaro.org/
> ---
>  Documentation/devicetree/bindings/mux/mux-controller.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mux/mux-controller.yaml b/Documentation/devicetree/bindings/mux/mux-controller.yaml
index 8b943082a241..571ad9e13ecf 100644
--- a/Documentation/devicetree/bindings/mux/mux-controller.yaml
+++ b/Documentation/devicetree/bindings/mux/mux-controller.yaml
@@ -74,7 +74,7 @@  select:
 
 properties:
   $nodename:
-    pattern: '^mux-controller(@.*|-[0-9a-f]+)?$'
+    pattern: '^mux-controller(@.*|-([0-9]|[1-9][0-9]+))?$'
 
   '#mux-control-cells':
     enum: [ 0, 1 ]