diff mbox series

[net,2/2] dt-bindings: net: marvell,orion-mdio: Fix examples

Message ID 20221227010523.59328-3-mig@semihalf.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series Orion MDIO DT binding fixes | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 23 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Michał Grzelak Dec. 27, 2022, 1:05 a.m. UTC
As stated in marvell-orion-mdio.txt deleted in 'commit 0781434af811f
("dt-bindings: net: orion-mdio: Convert to JSON schema")' if
'interrupts' property is present, width of 'reg' should be 0x84.
Otherwise, width of 'reg' should be 0x4. Fix 'examples:' and extend it
by second example from marvell-orion-mdio.txt.

Signed-off-by: Michał Grzelak <mig@semihalf.com>
---
 .../devicetree/bindings/net/marvell,orion-mdio.yaml  | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Dec. 27, 2022, 8:10 a.m. UTC | #1
On 27/12/2022 02:05, Michał Grzelak wrote:
> As stated in marvell-orion-mdio.txt deleted in 'commit 0781434af811f
> ("dt-bindings: net: orion-mdio: Convert to JSON schema")' if

Drop '' quotes.

BTW, read the original binding to find the answer for your first patch.


> 'interrupts' property is present, width of 'reg' should be 0x84.
> Otherwise, width of 'reg' should be 0x4. Fix 'examples:' and extend it
> by second example from marvell-orion-mdio.txt.

The original binding did not say that, unless you mean giving different
examples? Examples are not a binding.

> 
> Signed-off-by: Michał Grzelak <mig@semihalf.com>
> ---
>  .../devicetree/bindings/net/marvell,orion-mdio.yaml  | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml b/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
> index 2b2b3f8709fc..d260794e92c5 100644
> --- a/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
> @@ -47,9 +47,10 @@ unevaluatedProperties: false
>  
>  examples:
>    - |
> +    // MDIO binding with interrupt
>      mdio@d0072004 {
>        compatible = "marvell,orion-mdio";
> -      reg = <0xd0072004 0x4>;
> +      reg = <0xd0072004 0x84>;
>        #address-cells = <1>;
>        #size-cells = <0>;
>        interrupts = <30>;
> @@ -62,3 +63,12 @@ examples:
>          reg = <1>;
>        };
>      };
> +
> +  - |
> +    // MDIO binding without interrupt
> +    mdio@d0072004 {
> +      compatible = "marvell,orion-mdio";
> +      reg = <0xd0072004 0x4>;
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +    };

Why? The same compatible, the same nodes. No differences. Missing pieces
is not a big difference justifying new example.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml b/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
index 2b2b3f8709fc..d260794e92c5 100644
--- a/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
@@ -47,9 +47,10 @@  unevaluatedProperties: false
 
 examples:
   - |
+    // MDIO binding with interrupt
     mdio@d0072004 {
       compatible = "marvell,orion-mdio";
-      reg = <0xd0072004 0x4>;
+      reg = <0xd0072004 0x84>;
       #address-cells = <1>;
       #size-cells = <0>;
       interrupts = <30>;
@@ -62,3 +63,12 @@  examples:
         reg = <1>;
       };
     };
+
+  - |
+    // MDIO binding without interrupt
+    mdio@d0072004 {
+      compatible = "marvell,orion-mdio";
+      reg = <0xd0072004 0x4>;
+      #address-cells = <1>;
+      #size-cells = <0>;
+    };