diff mbox series

dt-bindings: iio: ti,ads8688 yaml conversion

Message ID 20200705131720.240574-1-jic23@kernel.org
State New
Headers show
Series dt-bindings: iio: ti,ads8688 yaml conversion | expand

Commit Message

Jonathan Cameron July 5, 2020, 1:17 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>


Fairly simple binding.  Most of the changes were filling in information
not previously found in the binding.  I dropped the previous explicit
mention of spi-max-frequency as that is covered by the generic SPI
binding.

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

Cc: Sean Nyekjaer <sean@geanix.com>
---

Sean, are you fine with being explicitly listed at the maintainer
of this binding?  Previously we didn't have that formally laid
out in the old txt bindings but it's now a required field.

I'm going to slowly work my way through some of the simpler yaml conversions
over the next few months.   Of course I welcome anyone else taking
some of these on but for purposes of review, please keep it to only
a few at a time.

 .../bindings/iio/adc/ti,ads8688.yaml          | 45 +++++++++++++++++++
 .../bindings/iio/adc/ti-ads8688.txt           | 20 ---------
 2 files changed, 45 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt

-- 
2.27.0

Comments

Sean Nyekjaer July 6, 2020, 7:51 a.m. UTC | #1
On 05/07/2020 15.17, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

>

> Fairly simple binding.  Most of the changes were filling in information

> not previously found in the binding.  I dropped the previous explicit

> mention of spi-max-frequency as that is covered by the generic SPI

> binding.

>

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

> Cc: Sean Nyekjaer <sean@geanix.com>

Acked-by: Sean Nyekjaer <sean@geanix.com>

> ---

>

> Sean, are you fine with being explicitly listed at the maintainer

> of this binding?  Previously we didn't have that formally laid

> out in the old txt bindings but it's now a required field.

Yes :)
>

> I'm going to slowly work my way through some of the simpler yaml conversions

> over the next few months.   Of course I welcome anyone else taking

> some of these on but for purposes of review, please keep it to only

> a few at a time.

>

>   .../bindings/iio/adc/ti,ads8688.yaml          | 45 +++++++++++++++++++

>   .../bindings/iio/adc/ti-ads8688.txt           | 20 ---------

>   2 files changed, 45 insertions(+), 20 deletions(-)

>   create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml

>   delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt

>

> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml

> new file mode 100644

> index 000000000000..97fe6cbb2efa

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml

> @@ -0,0 +1,45 @@

> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/iio/adc/ti,ads8688.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Texas Instruments' ADS8684 and ADS8688 ADC chip

> +

> +maintainers:

> +  - Sean Nyekjaer <sean@geanix.com>

> +

> +description: |

> +   SPI 16bit ADCs with 4/8 channels.

> +

> +properties:

> +  compatible:

> +    enum:

> +      - ti,ads8684

> +      - ti,ads8688

> +

> +  reg:

> +    maxItems: 1

> +

> +  vref-supply:

> +    description: Optional external reference.  If not supplied, assume

> +      REFSEL input tied low to enable the internal reference.

> +

> +required:

> +  - compatible

> +  - reg

> +

> +examples:

> +  - |

> +    spi {

> +        #address-cells = <1>;

> +        #size-cells = <0>;

> +

> +        adc@0 {

> +            compatible = "ti,ads8688";

> +            reg = <0>;

> +            vref-supply = <&vdd_supply>;

> +            spi-max-frequency = <1000000>;

> +        };

> +    };

> +...

> diff --git a/Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt b/Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt

> deleted file mode 100644

> index a02337d7efa4..000000000000

> --- a/Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt

> +++ /dev/null

> @@ -1,20 +0,0 @@

> -* Texas Instruments' ADS8684 and ADS8688 ADC chip

> -

> -Required properties:

> - - compatible: Should be "ti,ads8684" or "ti,ads8688"

> - - reg: spi chip select number for the device

> -

> -Recommended properties:

> - - spi-max-frequency: Definition as per

> -		Documentation/devicetree/bindings/spi/spi-bus.txt

> -

> -Optional properties:

> - - vref-supply: The regulator supply for ADC reference voltage

> -

> -Example:

> -adc@0 {

> -	compatible = "ti,ads8688";

> -	reg = <0>;

> -	vref-supply = <&vdd_supply>;

> -	spi-max-frequency = <1000000>;

> -};
Rob Herring (Arm) July 15, 2020, 9:57 p.m. UTC | #2
On Sun, Jul 05, 2020 at 02:17:20PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 

> Fairly simple binding.  Most of the changes were filling in information

> not previously found in the binding.  I dropped the previous explicit

> mention of spi-max-frequency as that is covered by the generic SPI

> binding.

> 

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

> Cc: Sean Nyekjaer <sean@geanix.com>

> ---

> 

> Sean, are you fine with being explicitly listed at the maintainer

> of this binding?  Previously we didn't have that formally laid

> out in the old txt bindings but it's now a required field.

> 

> I'm going to slowly work my way through some of the simpler yaml conversions

> over the next few months.   Of course I welcome anyone else taking

> some of these on but for purposes of review, please keep it to only

> a few at a time.


Actually, I'd really prefer a bunch at a time if it is by one person. 
Not because I need more to review :P, but then all the mistakes are the 
same and can be fixed in one go. I have a script[1] I use that does some 
of the boilerplate, but not the hard part (properties). It works best if 
you tweak the template with what's common for a set of bindings.

Rob

[1] https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=yaml-bindings-v2
Rob Herring (Arm) July 15, 2020, 9:58 p.m. UTC | #3
On Sun, 05 Jul 2020 14:17:20 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 

> Fairly simple binding.  Most of the changes were filling in information

> not previously found in the binding.  I dropped the previous explicit

> mention of spi-max-frequency as that is covered by the generic SPI

> binding.

> 

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

> Cc: Sean Nyekjaer <sean@geanix.com>

> ---

> 

> Sean, are you fine with being explicitly listed at the maintainer

> of this binding?  Previously we didn't have that formally laid

> out in the old txt bindings but it's now a required field.

> 

> I'm going to slowly work my way through some of the simpler yaml conversions

> over the next few months.   Of course I welcome anyone else taking

> some of these on but for purposes of review, please keep it to only

> a few at a time.

> 

>  .../bindings/iio/adc/ti,ads8688.yaml          | 45 +++++++++++++++++++

>  .../bindings/iio/adc/ti-ads8688.txt           | 20 ---------

>  2 files changed, 45 insertions(+), 20 deletions(-)

>  create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml

>  delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt

> 


Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron July 18, 2020, 4:33 p.m. UTC | #4
On Wed, 15 Jul 2020 15:57:44 -0600
Rob Herring <robh@kernel.org> wrote:

> On Sun, Jul 05, 2020 at 02:17:20PM +0100, Jonathan Cameron wrote:

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

> > 

> > Fairly simple binding.  Most of the changes were filling in information

> > not previously found in the binding.  I dropped the previous explicit

> > mention of spi-max-frequency as that is covered by the generic SPI

> > binding.

> > 

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

> > Cc: Sean Nyekjaer <sean@geanix.com>

> > ---

> > 

> > Sean, are you fine with being explicitly listed at the maintainer

> > of this binding?  Previously we didn't have that formally laid

> > out in the old txt bindings but it's now a required field.

> > 

> > I'm going to slowly work my way through some of the simpler yaml conversions

> > over the next few months.   Of course I welcome anyone else taking

> > some of these on but for purposes of review, please keep it to only

> > a few at a time.  

> 

> Actually, I'd really prefer a bunch at a time if it is by one person. 

> Not because I need more to review :P, but then all the mistakes are the 

> same and can be fixed in one go. I have a script[1] I use that does some 

> of the boilerplate, but not the hard part (properties). It works best if 

> you tweak the template with what's common for a set of bindings.


Fair enough.  Let the deluge begin :)

Applied this one to the togreg branch of iio.git and pushed out as testing
for the autobuilders to probably ignore it.

Thanks,

Jonathan

> 

> Rob

> 

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=yaml-bindings-v2
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
new file mode 100644
index 000000000000..97fe6cbb2efa
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
@@ -0,0 +1,45 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads8688.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments' ADS8684 and ADS8688 ADC chip
+
+maintainers:
+  - Sean Nyekjaer <sean@geanix.com>
+
+description: |
+   SPI 16bit ADCs with 4/8 channels.
+
+properties:
+  compatible:
+    enum:
+      - ti,ads8684
+      - ti,ads8688
+
+  reg:
+    maxItems: 1
+
+  vref-supply:
+    description: Optional external reference.  If not supplied, assume
+      REFSEL input tied low to enable the internal reference.
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,ads8688";
+            reg = <0>;
+            vref-supply = <&vdd_supply>;
+            spi-max-frequency = <1000000>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt b/Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt
deleted file mode 100644
index a02337d7efa4..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt
+++ /dev/null
@@ -1,20 +0,0 @@ 
-* Texas Instruments' ADS8684 and ADS8688 ADC chip
-
-Required properties:
- - compatible: Should be "ti,ads8684" or "ti,ads8688"
- - reg: spi chip select number for the device
-
-Recommended properties:
- - spi-max-frequency: Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Optional properties:
- - vref-supply: The regulator supply for ADC reference voltage
-
-Example:
-adc@0 {
-	compatible = "ti,ads8688";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-	spi-max-frequency = <1000000>;
-};