diff mbox series

[09/13] dt-bindings: iio: adc: ti,adc128s052 yaml conversion.

Message ID 20200809111753.156236-10-jic23@kernel.org
State New
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 binding.  Only addition to txt version is
as a provider of channels to other devices using the consumer
binding.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
 .../bindings/iio/adc/ti,adc128s052.yaml       | 59 +++++++++++++++++++
 .../bindings/iio/adc/ti-adc128s052.txt        | 25 --------
 2 files changed, 59 insertions(+), 25 deletions(-)

-- 
2.28.0

Comments

Rob Herring (Arm) Aug. 18, 2020, 2:30 a.m. UTC | #1
On Sun, 09 Aug 2020 12:17:49 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 

> Simple binding.  Only addition to txt version is

> as a provider of channels to other devices using the consumer

> binding.

> 

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>

> ---

>  .../bindings/iio/adc/ti,adc128s052.yaml       | 59 +++++++++++++++++++

>  .../bindings/iio/adc/ti-adc128s052.txt        | 25 --------

>  2 files changed, 59 insertions(+), 25 deletions(-)

> 


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

> On Sun, 09 Aug 2020 12:17:49 +0100, Jonathan Cameron wrote:

> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> > 

> > Simple binding.  Only addition to txt version is

> > as a provider of channels to other devices using the consumer

> > binding.

> > 

> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> > Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>

> > ---

> >  .../bindings/iio/adc/ti,adc128s052.yaml       | 59 +++++++++++++++++++

> >  .../bindings/iio/adc/ti-adc128s052.txt        | 25 --------

> >  2 files changed, 59 insertions(+), 25 deletions(-)

> >   

> 

> Reviewed-by: Rob Herring <robh@kernel.org>

Applied
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml
new file mode 100644
index 000000000000..d54a0183f024
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml
@@ -0,0 +1,59 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,adc128s052.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ADC128S052 and similar ADCs
+
+maintainers:
+  - Angelo Compagnucci <angelo.compagnucci@gmail.com>
+
+description: |
+  Family of 12 bit SPI ADCs with 2 to 8 channels with a range of different
+  target sample rates.
+
+properties:
+  compatible:
+    enum:
+      - ti,adc122s021
+      - ti,adc122s051
+      - ti,adc122s101
+      - ti,adc124s021
+      - ti,adc124s051
+      - ti,adc124s101
+      - ti,adc128s052
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,adc128s052";
+            reg = <0>;
+            vref-supply = <&vdd_supply>;
+            spi-max-frequency = <1000000>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
deleted file mode 100644
index c07ce1a3f5c4..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
+++ /dev/null
@@ -1,25 +0,0 @@ 
-* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip
-
-Required properties:
- - compatible: Should be one of:
-   - "ti,adc128s052"
-   - "ti,adc122s021"
-   - "ti,adc122s051"
-   - "ti,adc122s101"
-   - "ti,adc124s021"
-   - "ti,adc124s051"
-   - "ti,adc124s101"
- - reg: spi chip select number for the device
- - vref-supply: The regulator supply for ADC reference voltage
-
-Recommended properties:
- - spi-max-frequency: Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Example:
-adc@0 {
-	compatible = "ti,adc128s052";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-	spi-max-frequency = <1000000>;
-};