diff mbox series

[net-next,v2,13/15] dt-bindings: net: add compatible strings for lan969x targets

Message ID 20241024-sparx5-lan969x-switch-driver-2-v2-13-a0b5fae88a0f@microchip.com (mailing list archive)
State New, archived
Headers show
Series net: sparx5: add support for lan969x switch device | expand

Commit Message

Daniel Machon Oct. 23, 2024, 10:01 p.m. UTC
Add compatible strings for the twelve different lan969x targets that we
support. Either a sparx5-switch or lan9691-switch compatible string
provided on their own, or any lan969x-switch compatible string with a
fallback to lan9691-switch.

Also, add myself as a maintainer.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
 .../bindings/net/microchip,sparx5-switch.yaml        | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Oct. 24, 2024, 7:36 a.m. UTC | #1
On Thu, Oct 24, 2024 at 12:01:32AM +0200, Daniel Machon wrote:
> Add compatible strings for the twelve different lan969x targets that we
> support. Either a sparx5-switch or lan9691-switch compatible string
> provided on their own, or any lan969x-switch compatible string with a
> fallback to lan9691-switch.
> 
> Also, add myself as a maintainer.
> 
> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
> Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> ---
>  .../bindings/net/microchip,sparx5-switch.yaml        | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
> index fcafef8d5a33..dedfad526666 100644
> --- a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
> +++ b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
> @@ -9,6 +9,7 @@ title: Microchip Sparx5 Ethernet switch controller
>  maintainers:
>    - Steen Hegelund <steen.hegelund@microchip.com>
>    - Lars Povlsen <lars.povlsen@microchip.com>
> +  - Daniel Machon <daniel.machon@microchip.com>
>  
>  description: |
>    The SparX-5 Enterprise Ethernet switch family provides a rich set of
> @@ -34,7 +35,24 @@ properties:
>      pattern: "^switch@[0-9a-f]+$"
>  
>    compatible:
> -    const: microchip,sparx5-switch
> +    oneOf:
> +      - enum:
> +          - microchip,lan9691-switch
> +          - microchip,sparx5-switch
> +      - items:
> +          - enum:
> +              - microchip,lan969c-switch
> +              - microchip,lan969b-switch
> +              - microchip,lan969a-switch
> +              - microchip,lan9699-switch
> +              - microchip,lan9698-switch
> +              - microchip,lan9697-switch
> +              - microchip,lan9696-switch
> +              - microchip,lan9695-switch
> +              - microchip,lan9694-switch
> +              - microchip,lan9693-switch
> +              - microchip,lan9692-switch

Usual order is increasing, not descreasing. It's fine to keep different
style than usual, but then just keep it in mind and enforce on any
future changes (because I will not remember the exception here and I
will always ask for increasing alphanumerical order).

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

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
index fcafef8d5a33..dedfad526666 100644
--- a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
+++ b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
@@ -9,6 +9,7 @@  title: Microchip Sparx5 Ethernet switch controller
 maintainers:
   - Steen Hegelund <steen.hegelund@microchip.com>
   - Lars Povlsen <lars.povlsen@microchip.com>
+  - Daniel Machon <daniel.machon@microchip.com>
 
 description: |
   The SparX-5 Enterprise Ethernet switch family provides a rich set of
@@ -34,7 +35,24 @@  properties:
     pattern: "^switch@[0-9a-f]+$"
 
   compatible:
-    const: microchip,sparx5-switch
+    oneOf:
+      - enum:
+          - microchip,lan9691-switch
+          - microchip,sparx5-switch
+      - items:
+          - enum:
+              - microchip,lan969c-switch
+              - microchip,lan969b-switch
+              - microchip,lan969a-switch
+              - microchip,lan9699-switch
+              - microchip,lan9698-switch
+              - microchip,lan9697-switch
+              - microchip,lan9696-switch
+              - microchip,lan9695-switch
+              - microchip,lan9694-switch
+              - microchip,lan9693-switch
+              - microchip,lan9692-switch
+          - const: microchip,lan9691-switch
 
   reg:
     items: