diff mbox series

[04/13] dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.

Message ID 20200809111753.156236-5-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>


Very simple binding for this i2c device with a reference supply.

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

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

Cc: Michael Hennerich <michael.hennerich@analog.com>
---
 .../bindings/iio/adc/lltc,ltc2497.yaml        | 44 +++++++++++++++++++
 .../devicetree/bindings/iio/adc/ltc2497.txt   | 13 ------
 2 files changed, 44 insertions(+), 13 deletions(-)

-- 
2.28.0

Comments

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

> 

> Very simple binding for this i2c device with a reference supply.

> 

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

> 

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

> Cc: Michael Hennerich <michael.hennerich@analog.com>

> ---

>  .../bindings/iio/adc/lltc,ltc2497.yaml        | 44 +++++++++++++++++++

>  .../devicetree/bindings/iio/adc/ltc2497.txt   | 13 ------

>  2 files changed, 44 insertions(+), 13 deletions(-)

> 


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

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

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

> > 

> > Very simple binding for this i2c device with a reference supply.

> > 

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

> > 

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

> > Cc: Michael Hennerich <michael.hennerich@analog.com>

> > ---

> >  .../bindings/iio/adc/lltc,ltc2497.yaml        | 44 +++++++++++++++++++

> >  .../devicetree/bindings/iio/adc/ltc2497.txt   | 13 ------

> >  2 files changed, 44 insertions(+), 13 deletions(-)

> >   

> 

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


Applied
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
new file mode 100644
index 000000000000..6a176f551d75
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
@@ -0,0 +1,44 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2497.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Linear Technology / Analog Devices LTC2497 ADC
+
+maintainers:
+  - Michael Hennerich <michael.hennerich@analog.com>
+
+description: |
+  16bit ADC supporting up to 16 single ended or 8 differential inputs.
+  I2C interface.
+
+properties:
+  compatible:
+    const:
+      lltc,ltc2497
+
+  reg: true
+  vref-supply: true
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@76 {
+            compatible = "lltc,ltc2497";
+            reg = <0x76>;
+            vref-supply = <&ltc2497_reg>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ltc2497.txt b/Documentation/devicetree/bindings/iio/adc/ltc2497.txt
deleted file mode 100644
index a237ed99c0d8..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ltc2497.txt
+++ /dev/null
@@ -1,13 +0,0 @@ 
-* Linear Technology / Analog Devices LTC2497 ADC
-
-Required properties:
- - compatible: Must be "lltc,ltc2497"
- - reg: Must contain the ADC I2C address
- - vref-supply: The regulator supply for ADC reference voltage
-
-Example:
-	ltc2497: adc@76 {
-		compatible = "lltc,ltc2497";
-		reg = <0x76>;
-		vref-supply = <&ltc2497_reg>;
-	};