diff mbox series

[06/13] dt-bindings: iio: adc: ti,adc0832 yaml conversion.

Message ID 20200809111753.156236-7-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 conversion of this SPI ADC binding, with reference
voltage.

Added the optional property #io-channel-cells to allow for
consumers of channels if that makes sense for a given board.

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

Cc: Akinobu Mita <akinobu.mita@gmail.com>
---
 .../bindings/iio/adc/ti,adc0832.yaml          | 56 +++++++++++++++++++
 .../bindings/iio/adc/ti-adc0832.txt           | 19 -------
 2 files changed, 56 insertions(+), 19 deletions(-)

-- 
2.28.0

Comments

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

> 

> Simple binding conversion of this SPI ADC binding, with reference

> voltage.

> 

> Added the optional property #io-channel-cells to allow for

> consumers of channels if that makes sense for a given board.

> 

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

> Cc: Akinobu Mita <akinobu.mita@gmail.com>

> ---

>  .../bindings/iio/adc/ti,adc0832.yaml          | 56 +++++++++++++++++++

>  .../bindings/iio/adc/ti-adc0832.txt           | 19 -------

>  2 files changed, 56 insertions(+), 19 deletions(-)

> 


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

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml
new file mode 100644
index 000000000000..f5a923cc847f
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml
@@ -0,0 +1,56 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,adc0832.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ADC0832 and similar ADCs
+
+maintainers:
+  - Akinobu Mita <akinobu.mita@gmail.com>
+
+description: |
+  8 bit ADCs with 1, 2, 4 or 8 inputs for single ended or differential
+  conversion.
+
+properties:
+  compatible:
+    enum:
+      - ti,adc0831
+      - ti,adc0832
+      - ti,adc0834
+      - ti,adc0838
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vref-supply:
+    description: External reference, needed to establish input scaling
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,adc0832";
+            reg = <0>;
+            vref-supply = <&vdd_supply>;
+            spi-max-frequency = <200000>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc0832.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc0832.txt
deleted file mode 100644
index d91130587d01..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ti-adc0832.txt
+++ /dev/null
@@ -1,19 +0,0 @@ 
-* Texas Instruments' ADC0831/ADC0832/ADC0832/ADC0838
-
-Required properties:
- - compatible: Should be one of
-	* "ti,adc0831"
-	* "ti,adc0832"
-	* "ti,adc0834"
-	* "ti,adc0838"
- - reg: spi chip select number for the device
- - vref-supply: The regulator supply for ADC reference voltage
- - spi-max-frequency: Max SPI frequency to use (< 400000)
-
-Example:
-adc@0 {
-	compatible = "ti,adc0832";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-	spi-max-frequency = <200000>;
-};