diff mbox series

[v3,2/2] dt-bindings: net: dsa-port: constrain number of 'reg' in ports

Message ID 20221102161512.53399-2-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Commit a352a2c5d2a504f17c7096c9085177a54917012d
Delegated to: Netdev Maintainers
Headers show
Series [v3,1/2] dt-bindings: net: constrain number of 'reg' in ethernet ports | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Krzysztof Kozlowski Nov. 2, 2022, 4:15 p.m. UTC
'reg' without any constraints allows multiple items which is not the
intention in DSA port schema (as physical port is expected to have only
one address).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes since v2:
1. New patch
---
 Documentation/devicetree/bindings/net/dsa/dsa-port.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Rob Herring (Arm) Nov. 4, 2022, 9:52 p.m. UTC | #1
On Wed, 02 Nov 2022 12:15:12 -0400, Krzysztof Kozlowski wrote:
> 'reg' without any constraints allows multiple items which is not the
> intention in DSA port schema (as physical port is expected to have only
> one address).
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Changes since v2:
> 1. New patch
> ---
>  Documentation/devicetree/bindings/net/dsa/dsa-port.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Florian Fainelli Nov. 4, 2022, 10:39 p.m. UTC | #2
On 11/2/22 09:15, Krzysztof Kozlowski wrote:
> 'reg' without any constraints allows multiple items which is not the
> intention in DSA port schema (as physical port is expected to have only
> one address).
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
index 10ad7e71097b..9abb8eba5fad 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
@@ -19,7 +19,8 @@  allOf:
 
 properties:
   reg:
-    description: Port number
+    items:
+      - description: Port number
 
   label:
     description: