diff mbox series

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

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

Commit Message

Puranjay Mohan April 1, 2021, 9:16 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   | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml

Comments

Rob Herring (Arm) April 1, 2021, 2:56 p.m. UTC | #1
On Thu, 01 Apr 2021 14:46:47 +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   | 34 +++++++++++++++++++
>  1 file changed, 34 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:
Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dts:21.13-26: Warning (reg_format): /example-0/tmp117@48:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)
Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.example.dt.yaml: example-0: tmp117@48:reg:0: [72] is too short
	From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml

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

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.
Jonathan Cameron April 1, 2021, 3:13 p.m. UTC | #2
On Thu,  1 Apr 2021 14:46:47 +0530
Puranjay Mohan <puranjay12@gmail.com> 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   | 34 +++++++++++++++++++
>  1 file changed, 34 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..1ead22317
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
> @@ -0,0 +1,34 @@
> +# 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
> +    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
> +
> +additionalProperties: false
> +
> +examples:
> +  - | 
> +    tmp117@48 {
> +        compatible = "ti,tmp117";
> +        reg = <0x48>;
> +      };  

For the example embed it in an appropriate i2c description e.g.

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        tmp117@48 {
             compatible = "ti,tmp117";
             reg = <0x48>;
        };
    };
Rob Herring (Arm) April 1, 2021, 4:09 p.m. UTC | #3
On Thu, Apr 01, 2021 at 02:46:47PM +0530, Puranjay Mohan wrote:
> Add devicetree binding document for TMP117, a digital temperature sensor.

Please run checkpatch.pl and fix trailing WS.

> 
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
>  .../bindings/iio/temperature/ti,tmp117.yaml   | 34 +++++++++++++++++++
>  1 file changed, 34 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..1ead22317
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
> @@ -0,0 +1,34 @@
> +# 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
> +    I2C interface.
> +      https://www.ti.com/lit/gpn/tmp1
> +
> +maintainers: 
> +  - "Puranjay Mohan <puranjay12@gmail.com>"

Don't need quotes.

> +
> +properties: 
> +  compatible: 
> +    enum: 
> +      - "ti,tmp117"

Don't need quotes.

Blank line here.

> +  reg: 
> +    maxItems: 1

blank line here.

> +required: 
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - | 
> +    tmp117@48 {
> +        compatible = "ti,tmp117";
> +        reg = <0x48>;

You could just add to trivial-devices.yaml.

> +      };  
> -- 
> 2.30.1
>
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..1ead22317
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
@@ -0,0 +1,34 @@ 
+# 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
+    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
+
+additionalProperties: false
+
+examples:
+  - | 
+    tmp117@48 {
+        compatible = "ti,tmp117";
+        reg = <0x48>;
+      };