diff mbox series

[v1,1/2] dt-bindings: iio: temperature: Add DT bindings for TMP117

Message ID 20210320064509.119878-2-puranjay12@gmail.com (mailing list archive)
State New, archived
Headers show
Series iio: temperature: add support for tmp117 | expand

Commit Message

Puranjay Mohan March 20, 2021, 6:45 a.m. UTC
Add devicetree binding document for TMP117, a digital temperature sensor.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
 .../bindings/iio/temperature/ti,tmp117.yaml   | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml

Comments

Jonathan Cameron March 20, 2021, 5:51 p.m. UTC | #1
On Sat, 20 Mar 2021 12:15:08 +0530
Puranjay Mohan <puranjay12@gmail.com> wrote:

> Add devicetree binding document for TMP117, a digital temperature sensor.

Contents looks fine, but the ordering is unusual.

Vast majority of bindings I've seen have document in an order that makes
sense for human readers (not alphabetical!)  Use whitespace
to help readability as well.

Something like:


> @@ -0,0 +1,27 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/iio/temperature/ti,tmp117.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

> +title: "TI TMP117 - Digital temperature sensor with integrated NV memory"

> +description: |
> +    TI TMP117 - Digital temperature sensor with integrated NV memory that supports

Avoid repeating info in the title.

> +    I2C interface.
> +      https://www.ti.com/lit/gpn/tmp1

> +maintainers: 
> +  - "Puranjay Mohan <puranjay12@gmail.com>"

> +properties: 
> +  compatible: 
> +    enum: 
> +      - "ti,tmp117"
> +  reg: 
> +    maxItems: 1

> +required: 
> +  - compatible
> +  - reg

> +examples: |
> +    tmp117@48 {
> +        compatible = "ti,tmp117";
> +        reg = <0x48>;
> +    };

> 
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
>  .../bindings/iio/temperature/ti,tmp117.yaml   | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
> new file mode 100644
> index 000000000..927660461
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
> @@ -0,0 +1,27 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/iio/temperature/ti,tmp117.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +description: |
> +    TI TMP117 - Digital temperature sensor with integrated NV memory that supports
> +    I2C interface.
> +      https://www.ti.com/lit/gpn/tmp1
> +examples: |
> +    tmp117@48 {
> +        compatible = "ti,tmp117";
> +        reg = <0x48>;
> +    };
> +maintainers: 
> +  - "Puranjay Mohan <puranjay12@gmail.com>"
> +properties: 
> +  compatible: 
> +    enum: 
> +      - "ti,tmp117"
> +  reg: 
> +    maxItems: 1
> +required: 
> +  - compatible
> +  - reg
> +title: "TI TMP117 - Digital temperature sensor with integrated NV memory"
> +
Rob Herring (Arm) March 22, 2021, 12:15 a.m. UTC | #2
On Sat, 20 Mar 2021 12:15:08 +0530, Puranjay Mohan wrote:
> Add devicetree binding document for TMP117, a digital temperature sensor.
> 
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
>  .../bindings/iio/temperature/ti,tmp117.yaml   | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml: examples: 'tmp117@48 {\n    compatible = "ti,tmp117";\n    reg = <0x48>;\n};\n' is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml: examples: 'tmp117@48 {\n    compatible = "ti,tmp117";\n    reg = <0x48>;\n};\n' is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml: 'additionalProperties' is a required property
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml: ignoring, error in schema: examples
warning: no schema found in file: ./Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
Error: Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dts:20.5-6 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:349: Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml] Error 1
make: *** [Makefile:1380: dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1456094

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
new file mode 100644
index 000000000..927660461
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
@@ -0,0 +1,27 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/iio/temperature/ti,tmp117.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+description: |
+    TI TMP117 - Digital temperature sensor with integrated NV memory that supports
+    I2C interface.
+      https://www.ti.com/lit/gpn/tmp1
+examples: |
+    tmp117@48 {
+        compatible = "ti,tmp117";
+        reg = <0x48>;
+    };
+maintainers: 
+  - "Puranjay Mohan <puranjay12@gmail.com>"
+properties: 
+  compatible: 
+    enum: 
+      - "ti,tmp117"
+  reg: 
+    maxItems: 1
+required: 
+  - compatible
+  - reg
+title: "TI TMP117 - Digital temperature sensor with integrated NV memory"
+