2023-08-12 10:04:45

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH 3/4] dt-bindings: net: dsa: realtek: require compatible property under mdio node

The compatible property must be defined under the mdio node. Enforce it.

Signed-off-by: Arınç ÜNAL <[email protected]>
---
Documentation/devicetree/bindings/net/dsa/realtek.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
index ea7db0890abc..f600e65fc990 100644
--- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
@@ -103,6 +103,9 @@ allOf:
compatible:
const: realtek,smi-mdio

+ required:
+ - compatible
+
- if:
required:
- reg
--
2.39.2



2023-08-12 17:01:54

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: [PATCH 3/4] dt-bindings: net: dsa: realtek: require compatible property under mdio node

I will drop this patch because only the SMI controlled switches must define
the compatible string. There's no way to make a distinction between the SMI
and MDIO controlled switches on the schema so this would mean requiring the
compatible property for the MDIO controlled switches too which is wrong.

Arınç

On 12.08.2023 12:17, Arınç ÜNAL wrote:
> The compatible property must be defined under the mdio node. Enforce it.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> ---
> Documentation/devicetree/bindings/net/dsa/realtek.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> index ea7db0890abc..f600e65fc990 100644
> --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> @@ -103,6 +103,9 @@ allOf:
> compatible:
> const: realtek,smi-mdio
>
> + required:
> + - compatible
> +
> - if:
> required:
> - reg

2023-08-14 15:38:01

by Vladimir Oltean

[permalink] [raw]
Subject: Re: [PATCH 3/4] dt-bindings: net: dsa: realtek: require compatible property under mdio node

On Sat, Aug 12, 2023 at 12:17:07PM +0300, Arınç ÜNAL wrote:
> The compatible property must be defined under the mdio node. Enforce it.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> ---

Reviewed-by: Vladimir Oltean <[email protected]>

> Documentation/devicetree/bindings/net/dsa/realtek.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> index ea7db0890abc..f600e65fc990 100644
> --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> @@ -103,6 +103,9 @@ allOf:
> compatible:
> const: realtek,smi-mdio
>
> + required:
> + - compatible
> +
> - if:
> required:
> - reg
> --
> 2.39.2
>