diff mbox series

[net-next,1/1] dt-bindings: ptp: Add device tree binding for IDT FemtoClock

Message ID LV3P220MB1202BACF71E85F949FC09A29A0062@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net-next,1/1] dt-bindings: ptp: Add device tree binding for IDT FemtoClock | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 948 this patch: 948
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: robh@kernel.org
netdev/build_clang success Errors and warnings before: 954 this patch: 954
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
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: 960 this patch: 960
netdev/checkpatch warning WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-04-11--09-00 (tests: 961)

Commit Message

Min Li April 10, 2024, 6:41 p.m. UTC
From: Min Li <min.li.xe@renesas.com>

Add device tree binding doc for the IDT FemtoClock Frequency
Clock Synthesizers.

Signed-off-by: Min Li <min.li.xe@renesas.com>
---
 .../devicetree/bindings/ptp/ptp-idtfc3.yaml   | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml

Comments

Krzysztof Kozlowski April 10, 2024, 7:23 p.m. UTC | #1
On 10/04/2024 20:41, Min Li wrote:
> From: Min Li <min.li.xe@renesas.com>
> 
> Add device tree binding doc for the IDT FemtoClock Frequency
> Clock Synthesizers.

A nit, subject: drop second/last, redundant "device tree binding for"
The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

> 
> Signed-off-by: Min Li <min.li.xe@renesas.com>
> ---
>  .../devicetree/bindings/ptp/ptp-idtfc3.yaml   | 47 +++++++++++++++++++

Filename based on compatible, e.g. idt,rc38xxx.yaml

>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
> 
> diff --git a/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml b/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
> new file mode 100644
> index 000000000000..3e1c3135df5a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ptp/ptp-idtfc3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RENESAS FemtoClock (TM) Frequency Clock Synthesizers
> +
> +maintainers:
> +  - Min Li <min.li.xe@renesas.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      # For System Synchronizer
> +      - idt,rc38xxx0
> +      - idt,rc38xxx1
> +      - idt,rc38xxx2
> +      - idt,rc38xxx3
> +      - idt,rc38xxx4
> +      - idt,rc38xxx5
> +      - idt,rc38xxx6
> +      - idt,rc38xxx7
> +      - idt,rc38xxx8
> +      - idt,rc38xxx9

What are the "xxx"? Wild-cards? Are these compatible? Please read
writing-bindings.

> +
> +  reg:
> +    maxItems: 1
> +    description:
> +      I2C slave address of the device.

Drop description, it is redundant.

This looks quite incomplete. Why it cannot be part of existing idt binding?

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +	phc@9 { /* FemtoClock3 */

You have totally messed indentation. What's more, this was not tested.

What is "FemtoClock3" doing here? What is it exactly?

> +		compatible = "idt,rc38xxx0";
> +		reg = <0x9>;

What's more, where is any user of it? What's the point of adding binding
without any users? Please read submitting patches in DT bindings directory.

Best regards,
Krzysztof
Rob Herring (Arm) April 10, 2024, 7:32 p.m. UTC | #2
On Wed, 10 Apr 2024 14:41:47 -0400, Min Li wrote:
> From: Min Li <min.li.xe@renesas.com>
> 
> Add device tree binding doc for the IDT FemtoClock Frequency
> Clock Synthesizers.
> 
> Signed-off-by: Min Li <min.li.xe@renesas.com>
> ---
>  .../devicetree/bindings/ptp/ptp-idtfc3.yaml   | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml:43:1: [error] syntax error: found character '\t' that cannot start any token (syntax)

dtschema/dtc warnings/errors:
make[2]: *** Deleting file 'Documentation/devicetree/bindings/ptp/ptp-idtfc3.example.dts'
Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml:43:1: found a tab character where an indentation space is expected
make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/ptp/ptp-idtfc3.example.dts] Error 1
make[2]: *** Waiting for unfinished jobs....
./Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml:43:1: found a tab character where an indentation space is expected
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml: ignoring, error parsing file
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1430: dt_binding_check] Error 2
make: *** [Makefile:240: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/LV3P220MB1202BACF71E85F949FC09A29A0062@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml b/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
new file mode 100644
index 000000000000..3e1c3135df5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
@@ -0,0 +1,47 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ptp/ptp-idtfc3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RENESAS FemtoClock (TM) Frequency Clock Synthesizers
+
+maintainers:
+  - Min Li <min.li.xe@renesas.com>
+
+properties:
+  compatible:
+    enum:
+      # For System Synchronizer
+      - idt,rc38xxx0
+      - idt,rc38xxx1
+      - idt,rc38xxx2
+      - idt,rc38xxx3
+      - idt,rc38xxx4
+      - idt,rc38xxx5
+      - idt,rc38xxx6
+      - idt,rc38xxx7
+      - idt,rc38xxx8
+      - idt,rc38xxx9
+
+  reg:
+    maxItems: 1
+    description:
+      I2C slave address of the device.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+	phc@9 { /* FemtoClock3 */
+		compatible = "idt,rc38xxx0";
+		reg = <0x9>;
+	};
+    };