diff mbox series

[37/46] dt-binding:iio:adc:ti,ads124s08: txt to yaml format conversion.

Message ID 20201031184854.745828-38-jic23@kernel.org (mailing list archive)
State New
Headers show
Series dt-bindings:iio: yet more txt to yam conversions | expand

Commit Message

Jonathan Cameron Oct. 31, 2020, 6:48 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Simple binding so straight forward format conversion.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Dan Murphy <dmurphy@ti.com>
---
 .../bindings/iio/adc/ti,ads124s08.yaml        | 52 +++++++++++++++++++
 .../bindings/iio/adc/ti-ads124s08.txt         | 25 ---------
 2 files changed, 52 insertions(+), 25 deletions(-)

Comments

Dan Murphy Nov. 2, 2020, 12:49 p.m. UTC | #1
Jonathan

On 10/31/20 1:48 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Simple binding so straight forward format conversion.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Dan Murphy <dmurphy@ti.com>
> ---
>   .../bindings/iio/adc/ti,ads124s08.yaml        | 52 +++++++++++++++++++
>   .../bindings/iio/adc/ti-ads124s08.txt         | 25 ---------
>   2 files changed, 52 insertions(+), 25 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
> new file mode 100644
> index 000000000000..5912a52953fa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
GPL-2.0-only  OR BSD-2-Clause

Otherwise

Reviewed-by: Dan Murphy <dmurphy@ti.com>
Jonathan Cameron Nov. 8, 2020, 4:59 p.m. UTC | #2
On Mon, 2 Nov 2020 06:49:54 -0600
Dan Murphy <dmurphy@ti.com> wrote:

> Jonathan
> 
> On 10/31/20 1:48 PM, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Simple binding so straight forward format conversion.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Dan Murphy <dmurphy@ti.com>
> > ---
> >   .../bindings/iio/adc/ti,ads124s08.yaml        | 52 +++++++++++++++++++
> >   .../bindings/iio/adc/ti-ads124s08.txt         | 25 ---------
> >   2 files changed, 52 insertions(+), 25 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
> > new file mode 100644
> > index 000000000000..5912a52953fa
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
> > @@ -0,0 +1,52 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)  
> GPL-2.0-only  OR BSD-2-Clause
> 

Fair enough, GPL-2.0 is defined as meaning the same, but is deprecated
according to the SPDX list of names.
@Rob, I assume we aren't taking a strong view on which is preferred for
DT bindings?

Jonathan


> Otherwise
> 
> Reviewed-by: Dan Murphy <dmurphy@ti.com>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
new file mode 100644
index 000000000000..5912a52953fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads124s08.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments' ads124s08 and ads124s06 ADC chip
+
+maintainers:
+  - Dan Murphy <dmurphy@ti.com>
+
+properties:
+  compatible:
+    enum:
+      - ti,ads124s06
+      - ti,ads124s08
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  spi-cpha: true
+
+  reset-gpios:
+    maxItems: 1
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,ads124s08";
+            reg = <0>;
+            spi-max-frequency = <1000000>;
+            spi-cpha;
+            reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-ads124s08.txt b/Documentation/devicetree/bindings/iio/adc/ti-ads124s08.txt
deleted file mode 100644
index ecf807bb32f7..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ti-ads124s08.txt
+++ /dev/null
@@ -1,25 +0,0 @@ 
-* Texas Instruments' ads124s08 and ads124s06 ADC chip
-
-Required properties:
- - compatible :
-	"ti,ads124s08"
-	"ti,ads124s06"
- - reg : spi chip select number for the device
-
-Recommended properties:
- - spi-max-frequency : Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
- - spi-cpha : Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Optional properties:
- - reset-gpios : GPIO pin used to reset the device.
-
-Example:
-adc@0 {
-	compatible = "ti,ads124s08";
-	reg = <0>;
-	spi-max-frequency = <1000000>;
-	spi-cpha;
-	reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
-};