diff mbox series

[07/13] dt-bindings: iio: adc: ti,adc084s021 yaml conversion

Message ID 20200809111753.156236-8-jic23@kernel.org (mailing list archive)
State New, archived
Headers show
Series dt-bindings: yaml conversions of some simple ADC bindings. | expand

Commit Message

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

Simple conversion.

Added the #io-channel-cells optional property to allow for consumer
bindings if appropriate on a given board.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Mårten Lindahl <martenli@axis.com>
---
 .../bindings/iio/adc/ti,adc084s021.yaml       | 58 +++++++++++++++++++
 .../bindings/iio/adc/ti-adc084s021.txt        | 19 ------
 2 files changed, 58 insertions(+), 19 deletions(-)

Comments

Rob Herring (Arm) Aug. 18, 2020, 2:30 a.m. UTC | #1
On Sun, 09 Aug 2020 12:17:47 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Simple conversion.
> 
> Added the #io-channel-cells optional property to allow for consumer
> bindings if appropriate on a given board.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Mårten Lindahl <martenli@axis.com>
> ---
>  .../bindings/iio/adc/ti,adc084s021.yaml       | 58 +++++++++++++++++++
>  .../bindings/iio/adc/ti-adc084s021.txt        | 19 ------
>  2 files changed, 58 insertions(+), 19 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron Aug. 29, 2020, 5:53 p.m. UTC | #2
On Mon, 17 Aug 2020 20:30:00 -0600
Rob Herring <robh@kernel.org> wrote:

> On Sun, 09 Aug 2020 12:17:47 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Simple conversion.
> > 
> > Added the #io-channel-cells optional property to allow for consumer
> > bindings if appropriate on a given board.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Mårten Lindahl <martenli@axis.com>
> > ---
> >  .../bindings/iio/adc/ti,adc084s021.yaml       | 58 +++++++++++++++++++
> >  .../bindings/iio/adc/ti-adc084s021.txt        | 19 ------
> >  2 files changed, 58 insertions(+), 19 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied
Jonathan Cameron Oct. 27, 2020, 3:28 p.m. UTC | #3
On Sat, 29 Aug 2020 18:53:31 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Mon, 17 Aug 2020 20:30:00 -0600
> Rob Herring <robh@kernel.org> wrote:
> 
> > On Sun, 09 Aug 2020 12:17:47 +0100, Jonathan Cameron wrote:  
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > 
> > > Simple conversion.
> > > 
> > > Added the #io-channel-cells optional property to allow for consumer
> > > bindings if appropriate on a given board.
> > > 
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Mårten Lindahl <martenli@axis.com>
> > > ---
> > >  .../bindings/iio/adc/ti,adc084s021.yaml       | 58 +++++++++++++++++++
> > >  .../bindings/iio/adc/ti-adc084s021.txt        | 19 ------
> > >  2 files changed, 58 insertions(+), 19 deletions(-)
> > >     
> > 
> > Reviewed-by: Rob Herring <robh@kernel.org>  
> Applied
Or apparently I didn't.  Not sure what happened here, but now
actually applied to the togreg branch of iio.git.

Thanks,

Jonathan

> 
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml
new file mode 100644
index 000000000000..1a113b30a414
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,adc084s021.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ADC084S021 ADC
+
+maintainers:
+  - Mårten Lindahl <martenli@axis.com>
+
+description: |
+  8 bit ADC with 4 channels
+
+properties:
+  compatible:
+    const: ti,adc084s021
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vref-supply:
+    description: External reference, needed to establish input scaling
+
+  spi-cpol: true
+  spi-cpha: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+  - spi-cpol
+  - spi-cpha
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,adc084s021";
+            reg = <0>;
+            vref-supply = <&adc_vref>;
+            spi-cpol;
+            spi-cpha;
+            spi-max-frequency = <16000000>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt
deleted file mode 100644
index 4259e50620bc..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt
+++ /dev/null
@@ -1,19 +0,0 @@ 
-* Texas Instruments' ADC084S021
-
-Required properties:
- - compatible        : Must be "ti,adc084s021"
- - reg               : SPI chip select number for the device
- - vref-supply       : The regulator supply for ADC reference voltage
- - spi-cpol          : Per spi-bus bindings
- - spi-cpha          : Per spi-bus bindings
- - spi-max-frequency : Per spi-bus bindings
-
-Example:
-adc@0 {
-	compatible = "ti,adc084s021";
-	reg = <0>;
-	vref-supply = <&adc_vref>;
-	spi-cpol;
-	spi-cpha;
-	spi-max-frequency = <16000000>;
-};