diff mbox series

[1/6] dt-bindings: mips: realtek: Add rtl930x-soc compatible

Message ID 20240621042737.674128-2-chris.packham@alliedtelesis.co.nz (mailing list archive)
State Superseded
Headers show
Series mips: Support for RTL9302C | expand

Commit Message

Chris Packham June 21, 2024, 4:27 a.m. UTC
Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
strings.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Conor Dooley June 22, 2024, 12:15 p.m. UTC | #1
On Fri, Jun 21, 2024 at 04:27:32PM +1200, Chris Packham wrote:
> Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
> strings.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
>  Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> index f8ac309d2994..f59249a2cefe 100644
> --- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> +++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> @@ -19,6 +19,8 @@ properties:
>        - items:
>            - enum:
>                - cisco,sg220-26
> +              - realtek,RTL9302C

lower case please.

>            - const: realtek,rtl8382-soc
> +          - const: realtek,rtl930x-soc

Please avoid wildcards in compatibles. Can you add the actual compatible
instead please.

Also, I think this patch is wrong. It will disallow
compatible = "cisco,sg220-26", "realtek,rtl8382-soc"
and instead require
compatible = "cisco,sg220-26", "realtek,rtl8382-soc", "realtek,rtl930x-soc"
  or
compatible = "realtek,RTL9302C, "realtek,rtl8382-soc", "realtek,rtl930x-soc"

Cheers,
Conor.

>  
>  additionalProperties: true
> -- 
> 2.45.2
>
Krzysztof Kozlowski June 23, 2024, 7:12 a.m. UTC | #2
On 21/06/2024 06:27, Chris Packham wrote:
> Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
> strings.

No, you did not do this. You added fallback, without any rationale.

> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
>  Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> index f8ac309d2994..f59249a2cefe 100644
> --- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> +++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> @@ -19,6 +19,8 @@ properties:
>        - items:
>            - enum:
>                - cisco,sg220-26
> +              - realtek,RTL9302C
>            - const: realtek,rtl8382-soc
> +          - const: realtek,rtl930x-soc

Does not look right. First: Not tested. Second: does not really make
sense and commit msg does not explain it to me. Also, no wildcards.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
index f8ac309d2994..f59249a2cefe 100644
--- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
+++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
@@ -19,6 +19,8 @@  properties:
       - items:
           - enum:
               - cisco,sg220-26
+              - realtek,RTL9302C
           - const: realtek,rtl8382-soc
+          - const: realtek,rtl930x-soc
 
 additionalProperties: true