diff mbox series

[05/13] dt-bindings: iio: adc: ti,adc161s626 yaml conversion.

Message ID 20200809111753.156236-6-jic23@kernel.org
State Not Applicable
Headers show
Series dt-bindings: yaml conversions of some simple ADC bindings. | expand

Checks

Context Check Description
robh/dt-meta-schema success
robh/checkpatch warning total: 0 errors, 1 warnings, 51 lines checked

Commit Message

Jonathan Cameron Aug. 9, 2020, 11:17 a.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Simple conversion for this ADC driver.  Note that I haven't put
limits on the spi-max-sampling-frequency because the adc161s626
doesn't state one clearly defined value.

Added the #io-channel-cells property to allow for consumers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
---
 .../bindings/iio/adc/ti,adc161s626.yaml       | 51 +++++++++++++++++++
 .../bindings/iio/adc/ti-adc161s626.txt        | 18 -------
 2 files changed, 51 insertions(+), 18 deletions(-)

Comments

Matt Ranostay Aug. 11, 2020, 3:35 a.m. UTC | #1
On Sun, Aug 9, 2020 at 4:20 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Simple conversion for this ADC driver.  Note that I haven't put
> limits on the spi-max-sampling-frequency because the adc161s626
> doesn't state one clearly defined value.
>
> Added the #io-channel-cells property to allow for consumers.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Matt Ranostay <matt.ranostay@konsulko.com>

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>


> ---
>  .../bindings/iio/adc/ti,adc161s626.yaml       | 51 +++++++++++++++++++
>  .../bindings/iio/adc/ti-adc161s626.txt        | 18 -------
>  2 files changed, 51 insertions(+), 18 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
> new file mode 100644
> index 000000000000..3f4f334d6f73
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/ti,adc161s626.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments ADC141S626 and ADC161S626 ADCs
> +
> +maintainers:
> +  - Matt Ranostay <matt.ranostay@konsulko.com>
> +
> +description: |
> +  Single channel 14/16bit differential ADCs
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,adc141s626
> +      - ti,adc161s626
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency: true
> +
> +  vdda-supply: true
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@0 {
> +            compatible = "ti,adc161s626";
> +            vdda-supply = <&vdda_fixed>;
> +            reg = <0>;
> +            spi-max-frequency = <4300000>;
> +            #io-channel-cells = <1>;
> +        };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt
> deleted file mode 100644
> index 3d25011f0c99..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -* Texas Instruments ADC141S626 and ADC161S626 chips
> -
> -Required properties:
> - - compatible: Should be "ti,adc141s626" or "ti,adc161s626"
> - - reg: spi chip select number for the device
> - - vdda-supply: supply voltage to VDDA pin
> -
> -Recommended properties:
> - - spi-max-frequency: Definition as per
> -               Documentation/devicetree/bindings/spi/spi-bus.txt
> -
> -Example:
> -adc@0 {
> -       compatible = "ti,adc161s626";
> -       vdda-supply = <&vdda_fixed>;
> -       reg = <0>;
> -       spi-max-frequency = <4300000>;
> -};
> --
> 2.28.0
>
Rob Herring Aug. 18, 2020, 2:28 a.m. UTC | #2
On Sun, 09 Aug 2020 12:17:45 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Simple conversion for this ADC driver.  Note that I haven't put
> limits on the spi-max-sampling-frequency because the adc161s626
> doesn't state one clearly defined value.
> 
> Added the #io-channel-cells property to allow for consumers.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> ---
>  .../bindings/iio/adc/ti,adc161s626.yaml       | 51 +++++++++++++++++++
>  .../bindings/iio/adc/ti-adc161s626.txt        | 18 -------
>  2 files changed, 51 insertions(+), 18 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron Aug. 29, 2020, 5:51 p.m. UTC | #3
On Mon, 17 Aug 2020 20:28:57 -0600
Rob Herring <robh@kernel.org> wrote:

> On Sun, 09 Aug 2020 12:17:45 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Simple conversion for this ADC driver.  Note that I haven't put
> > limits on the spi-max-sampling-frequency because the adc161s626
> > doesn't state one clearly defined value.
> > 
> > Added the #io-channel-cells property to allow for consumers.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> > ---
> >  .../bindings/iio/adc/ti,adc161s626.yaml       | 51 +++++++++++++++++++
> >  .../bindings/iio/adc/ti-adc161s626.txt        | 18 -------
> >  2 files changed, 51 insertions(+), 18 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
new file mode 100644
index 000000000000..3f4f334d6f73
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
@@ -0,0 +1,51 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,adc161s626.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ADC141S626 and ADC161S626 ADCs
+
+maintainers:
+  - Matt Ranostay <matt.ranostay@konsulko.com>
+
+description: |
+  Single channel 14/16bit differential ADCs
+
+properties:
+  compatible:
+    enum:
+      - ti,adc141s626
+      - ti,adc161s626
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vdda-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,adc161s626";
+            vdda-supply = <&vdda_fixed>;
+            reg = <0>;
+            spi-max-frequency = <4300000>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt
deleted file mode 100644
index 3d25011f0c99..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt
+++ /dev/null
@@ -1,18 +0,0 @@ 
-* Texas Instruments ADC141S626 and ADC161S626 chips
-
-Required properties:
- - compatible: Should be "ti,adc141s626" or "ti,adc161s626"
- - reg: spi chip select number for the device
- - vdda-supply: supply voltage to VDDA pin
-
-Recommended properties:
- - spi-max-frequency: Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Example:
-adc@0 {
-	compatible = "ti,adc161s626";
-	vdda-supply = <&vdda_fixed>;
-	reg = <0>;
-	spi-max-frequency = <4300000>;
-};