diff mbox series

[v2,13/20] dt-bindings:iio:adc:cosmic,10001-adc yaml conversion

Message ID 20200909175946.395313-14-jic23@kernel.org
State New
Headers show
Series dt-bindings:iio:adc: Another set of yaml conversions. | expand

Commit Message

Jonathan Cameron Sept. 9, 2020, 5:59 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>


I don't really know much about this one, hence the binding is
a simple conversion of what was in the txt file.

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

Cc: Phani Movva <Phani.Movva@imgtec.com>
---
 .../bindings/iio/adc/cc10001_adc.txt          | 22 -------
 .../bindings/iio/adc/cosmic,10001-adc.yaml    | 59 +++++++++++++++++++
 2 files changed, 59 insertions(+), 22 deletions(-)

-- 
2.28.0

Comments

Rob Herring (Arm) Sept. 15, 2020, 7:13 p.m. UTC | #1
On Wed, 09 Sep 2020 18:59:39 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 

> I don't really know much about this one, hence the binding is

> a simple conversion of what was in the txt file.

> 

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

> Cc: Phani Movva <Phani.Movva@imgtec.com>

> ---

>  .../bindings/iio/adc/cc10001_adc.txt          | 22 -------

>  .../bindings/iio/adc/cosmic,10001-adc.yaml    | 59 +++++++++++++++++++

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

> 


Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron Sept. 19, 2020, 2:07 p.m. UTC | #2
On Tue, 15 Sep 2020 13:13:17 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:39 +0100, Jonathan Cameron wrote:

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

> > 

> > I don't really know much about this one, hence the binding is

> > a simple conversion of what was in the txt file.

> > 

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

> > Cc: Phani Movva <Phani.Movva@imgtec.com>

> > ---

> >  .../bindings/iio/adc/cc10001_adc.txt          | 22 -------

> >  .../bindings/iio/adc/cosmic,10001-adc.yaml    | 59 +++++++++++++++++++

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

> >   

> 

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

For this one. I don't have an address for Phani Movva that works so
I have listed myself as maintainer for the binding until someone else
steps up.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to possibly poke at it.

Thanks,

Jonathan
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt b/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt
deleted file mode 100644
index 904f76de9055..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt
+++ /dev/null
@@ -1,22 +0,0 @@ 
-* Cosmic Circuits - Analog to Digital Converter (CC-10001-ADC)
-
-Required properties:
-  - compatible: Should be "cosmic,10001-adc"
-  - reg: Should contain adc registers location and length.
-  - clock-names: Should contain "adc".
-  - clocks: Should contain a clock specifier for each entry in clock-names
-  - vref-supply: The regulator supply ADC reference voltage.
-
-Optional properties:
-  - adc-reserved-channels: Bitmask of reserved channels,
-    i.e. channels that cannot be used by the OS.
-
-Example:
-adc: adc@18101600 {
-	compatible = "cosmic,10001-adc";
-	reg = <0x18101600 0x24>;
-	adc-reserved-channels = <0x2>;
-	clocks = <&adc_clk>;
-	clock-names = "adc";
-	vref-supply = <&reg_1v8>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml
new file mode 100644
index 000000000000..1c4838d4a547
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.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/cosmic,10001-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cosmic Circuits CC-10001 ADC
+
+maintainers:
+  - Phani Movva <Phani.Movva@imgtec.com>
+
+description:
+  Cosmic Circuits 10001 10-bit ADC device.
+
+properties:
+  compatible:
+    const: cosmic,10001-adc
+
+  reg:
+    maxItems: 1
+
+  adc-reserved-channels:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+       Bitmask of reserved channels, i.e. channels that cannot be
+       used by the OS.
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: adc
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - vref-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    adc@18101600 {
+        compatible = "cosmic,10001-adc";
+        reg = <0x18101600 0x24>;
+        adc-reserved-channels = <0x2>;
+        clocks = <&adc_clk>;
+        clock-names = "adc";
+        vref-supply = <&reg_1v8>;
+    };
+...