linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: iio: ad7949: switch binding to yaml
@ 2019-05-18 22:40 João Victor Marques de Oliveira
  2019-05-19 11:29 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: João Victor Marques de Oliveira @ 2019-05-18 22:40 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
	Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler
  Cc: linux-iio, linux-kernel, kernel-usp, Thiago L . A . Miller,
	Osvaldo M . Yasuda

Changes switches from old text bindings, to YAML bindings, and also
include adi,reference-select property to specify the source for the
reference voltage signal.

Signed-off-by: João Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
Signed-off-by: Thiago L. A. Miller <tmiller@mochsl.org.br>
Co-developed-by: Thiago L. A. Miller <tmiller@mochsl.org.br>
Signed-off-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
Co-developed-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
---
We're adding Charles-Antoine Couret as main dt maintainer since we have
just switched documentation to yaml format. 

 .../devicetree/bindings/iio/adc/ad7949.txt    | 16 -----
 .../devicetree/bindings/iio/adc/ad7949.yaml   | 71 +++++++++++++++++++
 2 files changed, 71 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.yaml

diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt
deleted file mode 100644
index c7f5057356b1..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-* Analog Devices AD7949/AD7682/AD7689
-
-Required properties:
- - compatible: Should be one of
-	* "adi,ad7949"
-	* "adi,ad7682"
-	* "adi,ad7689"
- - reg: spi chip select number for the device
- - vref-supply: The regulator supply for ADC reference voltage
-
-Example:
-adc@0 {
-	compatible = "adi,ad7949";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/ad7949.yaml
new file mode 100644
index 000000000000..111c9e26f8e7
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ad7949.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ad7949.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+
+title: Analog Devices AD7949/AD7682/AD7689
+
+maintainers:
+  - Charles-Antoine Couret <charles-antoine.couret@essensium.com>
+  - João Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
+  - Thiago L. A. Miller <tmiller@mochsl.org.br>
+  - Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
+
+properties:
+  compatible:
+    enum:
+      - adi,ad7949
+      - adi,ad7682
+      - adi,ad7689
+
+  reg:  
+    description:
+      spi chip select number for the device
+    maxItems: 1
+
+  vref-supply:
+    description:
+      The regulator supply for ADC reference voltage
+    maxItems: 1
+
+  adi,reference-select:
+    enum: [0, 1, 2, 3, 6, 7]
+    description:
+        Select the reference voltage source to use when converting the input voltages.
+            0 - Internal 2.5V reference; temperature sensor enabled
+            1 - Internal 4.096V reference; temperature sensor enabled
+            2 - External reference, temperature sensor enabled, no buffer
+            3 - External reference, temperature sensor enabled, buffer enabled
+            6 - External reference, temperature sensor disabled, no buffer
+            7 - External reference, temperature sensor disabled, buffer enabled
+    maxItems: 1
+
+required:
+  - compatible 
+  - reg
+  - vref-supply
+
+examples:
+  - |
+    spi0 {
+        #address-cells = <0x1>;
+        #size-cells = <0x0>;
+        adc@0 {
+            compatible = "adi,ad7949";
+            reg = <0>;
+            adi,reference-select = <0>;
+            vref-supply = <&vdd_supply>;
+        };
+    };
+  - |
+    spi0 {
+        #address-cells = <0x1>;
+        #size-cells = <0x0>;
+        adc@0 {
+            compatible = "adi,ad7949";
+            reg = <0>;
+            adi,reference-select = <0>;
+        };
+    };
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: iio: ad7949: switch binding to yaml
  2019-05-18 22:40 [PATCH] dt-bindings: iio: ad7949: switch binding to yaml João Victor Marques de Oliveira
@ 2019-05-19 11:29 ` Jonathan Cameron
  2019-05-20 11:30   ` Alexandru Ardelean
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2019-05-19 11:29 UTC (permalink / raw)
  To: João Victor Marques de Oliveira
  Cc: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
	Hartmut Knaack, Peter Meerwald-Stadler, linux-iio, linux-kernel,
	kernel-usp, Thiago L . A . Miller, Osvaldo M . Yasuda

On Sat, 18 May 2019 19:40:36 -0300
João Victor Marques de Oliveira         <joao.marques.oliveira@usp.br> wrote:

> Changes switches from old text bindings, to YAML bindings, and also
> include adi,reference-select property to specify the source for the
> reference voltage signal.
> 
> Signed-off-by: João Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
> Signed-off-by: Thiago L. A. Miller <tmiller@mochsl.org.br>
> Co-developed-by: Thiago L. A. Miller <tmiller@mochsl.org.br>
> Signed-off-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
> Co-developed-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
> ---
> We're adding Charles-Antoine Couret as main dt maintainer since we have
> just switched documentation to yaml format. 

Hmm. I'm not sure it makes sense to list you all as maintainers
of this rather simple binding.

We also just went through some changes on the reference handling so
I think you are based on stale information here.

Thanks,

Jonathan

> 
>  .../devicetree/bindings/iio/adc/ad7949.txt    | 16 -----
>  .../devicetree/bindings/iio/adc/ad7949.yaml   | 71 +++++++++++++++++++
>  2 files changed, 71 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.txt
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt
> deleted file mode 100644
> index c7f5057356b1..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -* Analog Devices AD7949/AD7682/AD7689
> -
> -Required properties:
> - - compatible: Should be one of
> -	* "adi,ad7949"
> -	* "adi,ad7682"
> -	* "adi,ad7689"
> - - reg: spi chip select number for the device
> - - vref-supply: The regulator supply for ADC reference voltage
> -
> -Example:
> -adc@0 {
> -	compatible = "adi,ad7949";
> -	reg = <0>;
> -	vref-supply = <&vdd_supply>;
> -};
> diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/ad7949.yaml
> new file mode 100644
> index 000000000000..111c9e26f8e7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ad7949.yaml
> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/ad7949.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +
> +title: Analog Devices AD7949/AD7682/AD7689
> +
> +maintainers:
> +  - Charles-Antoine Couret <charles-antoine.couret@essensium.com>
> +  - João Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
> +  - Thiago L. A. Miller <tmiller@mochsl.org.br>
> +  - Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad7949
> +      - adi,ad7682
> +      - adi,ad7689
> +
> +  reg:  
> +    description:
> +      spi chip select number for the device
> +    maxItems: 1
> +
> +  vref-supply:
> +    description:
> +      The regulator supply for ADC reference voltage
> +    maxItems: 1
> +
> +  adi,reference-select:
> +    enum: [0, 1, 2, 3, 6, 7]
> +    description:
> +        Select the reference voltage source to use when converting the input voltages.
> +            0 - Internal 2.5V reference; temperature sensor enabled
> +            1 - Internal 4.096V reference; temperature sensor enabled
> +            2 - External reference, temperature sensor enabled, no buffer
> +            3 - External reference, temperature sensor enabled, buffer enabled
> +            6 - External reference, temperature sensor disabled, no buffer
> +            7 - External reference, temperature sensor disabled, buffer enabled
This is changing...

> +    maxItems: 1
> +
> +required:
> +  - compatible 
> +  - reg
> +  - vref-supply
> +
> +examples:
> +  - |
> +    spi0 {
> +        #address-cells = <0x1>;
> +        #size-cells = <0x0>;
> +        adc@0 {
> +            compatible = "adi,ad7949";
> +            reg = <0>;
> +            adi,reference-select = <0>;
> +            vref-supply = <&vdd_supply>;
> +        };
> +    };
> +  - |
> +    spi0 {
> +        #address-cells = <0x1>;
> +        #size-cells = <0x0>;
> +        adc@0 {
> +            compatible = "adi,ad7949";
> +            reg = <0>;
> +            adi,reference-select = <0>;
> +        };
> +    };


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: iio: ad7949: switch binding to yaml
  2019-05-19 11:29 ` Jonathan Cameron
@ 2019-05-20 11:30   ` Alexandru Ardelean
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandru Ardelean @ 2019-05-20 11:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: João Victor Marques de Oliveira, Lars-Peter Clausen,
	Michael Hennerich, Stefan Popa, Hartmut Knaack,
	Peter Meerwald-Stadler, linux-iio, LKML, kernel-usp,
	Thiago L . A . Miller, Osvaldo M . Yasuda

On Sun, May 19, 2019 at 8:29 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Sat, 18 May 2019 19:40:36 -0300
> João Victor Marques de Oliveira         <joao.marques.oliveira@usp.br> wrote:
>
> > Changes switches from old text bindings, to YAML bindings, and also
> > include adi,reference-select property to specify the source for the
> > reference voltage signal.
> >
> > Signed-off-by: João Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
> > Signed-off-by: Thiago L. A. Miller <tmiller@mochsl.org.br>
> > Co-developed-by: Thiago L. A. Miller <tmiller@mochsl.org.br>
> > Signed-off-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
> > Co-developed-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
> > ---
> > We're adding Charles-Antoine Couret as main dt maintainer since we have
> > just switched documentation to yaml format.
>
> Hmm. I'm not sure it makes sense to list you all as maintainers
> of this rather simple binding.
>
> We also just went through some changes on the reference handling so
> I think you are based on stale information here.
>
> Thanks,
>
> Jonathan
>
> >
> >  .../devicetree/bindings/iio/adc/ad7949.txt    | 16 -----
> >  .../devicetree/bindings/iio/adc/ad7949.yaml   | 71 +++++++++++++++++++
> >  2 files changed, 71 insertions(+), 16 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.txt
> >  create mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.yaml

Maybe also update the MAINTAINERS file with this.

> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt
> > deleted file mode 100644
> > index c7f5057356b1..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt
> > +++ /dev/null
> > @@ -1,16 +0,0 @@
> > -* Analog Devices AD7949/AD7682/AD7689
> > -
> > -Required properties:
> > - - compatible: Should be one of
> > -     * "adi,ad7949"
> > -     * "adi,ad7682"
> > -     * "adi,ad7689"
> > - - reg: spi chip select number for the device
> > - - vref-supply: The regulator supply for ADC reference voltage
> > -
> > -Example:
> > -adc@0 {
> > -     compatible = "adi,ad7949";
> > -     reg = <0>;
> > -     vref-supply = <&vdd_supply>;
> > -};
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/ad7949.yaml
> > new file mode 100644
> > index 000000000000..111c9e26f8e7
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ad7949.yaml
> > @@ -0,0 +1,71 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/ad7949.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +

nitpick: extra line

> > +title: Analog Devices AD7949/AD7682/AD7689
> > +
> > +maintainers:
> > +  - Charles-Antoine Couret <charles-antoine.couret@essensium.com>
> > +  - João Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
> > +  - Thiago L. A. Miller <tmiller@mochsl.org.br>
> > +  - Osvaldo M. Yasuda <omyasuda@yahoo.com.br>
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - adi,ad7949
> > +      - adi,ad7682
> > +      - adi,ad7689
> > +
> > +  reg:
> > +    description:
> > +      spi chip select number for the device

this doesn't need a description
it's a standard property

> > +    maxItems: 1
> > +
> > +  vref-supply:
> > +    description:
> > +      The regulator supply for ADC reference voltage
> > +    maxItems: 1
> > +
> > +  adi,reference-select:
> > +    enum: [0, 1, 2, 3, 6, 7]
> > +    description:
> > +        Select the reference voltage source to use when converting the input voltages.
> > +            0 - Internal 2.5V reference; temperature sensor enabled
> > +            1 - Internal 4.096V reference; temperature sensor enabled
> > +            2 - External reference, temperature sensor enabled, no buffer
> > +            3 - External reference, temperature sensor enabled, buffer enabled
> > +            6 - External reference, temperature sensor disabled, no buffer
> > +            7 - External reference, temperature sensor disabled, buffer enabled
> This is changing...
>
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - vref-supply
> > +
> > +examples:
> > +  - |
> > +    spi0 {
> > +        #address-cells = <0x1>;
> > +        #size-cells = <0x0>;
> > +        adc@0 {
> > +            compatible = "adi,ad7949";
> > +            reg = <0>;
> > +            adi,reference-select = <0>;
> > +            vref-supply = <&vdd_supply>;
> > +        };
> > +    };

One example is enough in this case.
They don't differ much.

> > +  - |
> > +    spi0 {
> > +        #address-cells = <0x1>;
> > +        #size-cells = <0x0>;
> > +        adc@0 {
> > +            compatible = "adi,ad7949";
> > +            reg = <0>;
> > +            adi,reference-select = <0>;
> > +        };
> > +    };
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-20 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-18 22:40 [PATCH] dt-bindings: iio: ad7949: switch binding to yaml João Victor Marques de Oliveira
2019-05-19 11:29 ` Jonathan Cameron
2019-05-20 11:30   ` Alexandru Ardelean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).