diff mbox series

[v3,3/3] ltc2471 driver yaml

Message ID 20200727135834.84093-4-darius.berghe@analog.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/3] ltc2471: add of_match_table for existing devices | expand

Commit Message

Darius Berghe July 27, 2020, 1:58 p.m. UTC
Add dt binding documentation for ltc2471 driver. This covers all supported
devices.

Signed-off-by: Darius Berghe <darius.berghe@analog.com>
---
 .../bindings/iio/adc/adi,ltc2471.yaml         | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml

Comments

Jonathan Cameron July 27, 2020, 5:24 p.m. UTC | #1
On Mon, 27 Jul 2020 16:58:34 +0300
Darius Berghe <darius.berghe@analog.com> wrote:

> Add dt binding documentation for ltc2471 driver. This covers all supported
> devices.
> 
> Signed-off-by: Darius Berghe <darius.berghe@analog.com>

+CC Mike given the doc lists him as maintainer.

> ---
>  .../bindings/iio/adc/adi,ltc2471.yaml         | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml
> new file mode 100644
> index 000000000000..d5b35a1fa651
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright 2020 Analog Devices Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bindings/iio/adc/adi,ltc2471.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices LTC2471 16-bit I2C Sigma-Delta ADC
> +
> +maintainers:
> +  - Mike Looijmans <mike.looijmans@topic.nl>
> +
> +description: |
> +  Analog Devices LTC2461 (single-ended) and LTC2463 (differential) 16-bit
> +  I2C Sigma-Delta ADC with 60sps output rate.
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/24613fa.pdf
> +
> +  Analog Devices LTC2471 (single-ended) and LTC2473 (differential) 16-bit
> +  I2C Sigma-Delta ADC with selectable 208/833sps output rate.
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/24713fb.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ltc2461
> +      - adi,ltc2463
> +      - adi,ltc2471
> +      - adi,ltc2473
> +
> +  reg:
> +    maxItems: 1
> +
> +  avcc-supply:
> +    description:
> +      Phandle to the Avcc power supply (2.7V - 5.5V)

additionalProperties: false

should be fine here I think...
I keep forgetting this one myself.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +examples:
> +  - |
> +    i2c0 {
> +      adc@14 {
> +        compatible = "adi,ltc2461";
> +        reg = <0x14>;
> +      };
> +    };
> +
Rob Herring July 27, 2020, 6:15 p.m. UTC | #2
On Mon, 27 Jul 2020 16:58:34 +0300, Darius Berghe wrote:
> Add dt binding documentation for ltc2471 driver. This covers all supported
> devices.
> 
> Signed-off-by: Darius Berghe <darius.berghe@analog.com>
> ---
>  .../bindings/iio/adc/adi,ltc2471.yaml         | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml
> 


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

Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml: $id: relative path/filename doesn't match actual path or filename
	expected: http://devicetree.org/schemas/iio/adc/adi,ltc2471.yaml#
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dts:22.13-26: Warning (reg_format): /example-0/i2c0/adc@14:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dt.yaml: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dt.yaml: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dts:20.18-23.13: Warning (avoid_default_addr_size): /example-0/i2c0/adc@14: Relying on default #address-cells value
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dts:20.18-23.13: Warning (avoid_default_addr_size): /example-0/i2c0/adc@14: Relying on default #size-cells value
Documentation/devicetree/bindings/iio/adc/adi,ltc2471.example.dt.yaml: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'


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

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

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml
new file mode 100644
index 000000000000..d5b35a1fa651
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ltc2471.yaml
@@ -0,0 +1,49 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2020 Analog Devices Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/iio/adc/adi,ltc2471.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices LTC2471 16-bit I2C Sigma-Delta ADC
+
+maintainers:
+  - Mike Looijmans <mike.looijmans@topic.nl>
+
+description: |
+  Analog Devices LTC2461 (single-ended) and LTC2463 (differential) 16-bit
+  I2C Sigma-Delta ADC with 60sps output rate.
+  https://www.analog.com/media/en/technical-documentation/data-sheets/24613fa.pdf
+
+  Analog Devices LTC2471 (single-ended) and LTC2473 (differential) 16-bit
+  I2C Sigma-Delta ADC with selectable 208/833sps output rate.
+  https://www.analog.com/media/en/technical-documentation/data-sheets/24713fb.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,ltc2461
+      - adi,ltc2463
+      - adi,ltc2471
+      - adi,ltc2473
+
+  reg:
+    maxItems: 1
+
+  avcc-supply:
+    description:
+      Phandle to the Avcc power supply (2.7V - 5.5V)
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    i2c0 {
+      adc@14 {
+        compatible = "adi,ltc2461";
+        reg = <0x14>;
+      };
+    };
+