diff mbox series

[v2,19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion

Message ID 20200909175946.395313-20-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>


A nice simple binding.  Only real different from txt is that I dropped
some descriptions where the naming of the parameter was self explanatory

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

Cc: Haibo Chen <haibo.chen@freescale.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++
 .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------
 2 files changed, 62 insertions(+), 24 deletions(-)

-- 
2.28.0

Comments

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

> 

> A nice simple binding.  Only real different from txt is that I dropped

> some descriptions where the naming of the parameter was self explanatory

> 

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

> Cc: Haibo Chen <haibo.chen@freescale.com>

> Cc: Shawn Guo <shawnguo@kernel.org>

> Cc: Sascha Hauer <s.hauer@pengutronix.de>

> ---

>  .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++

>  .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------

>  2 files changed, 62 insertions(+), 24 deletions(-)

> 


Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron Sept. 16, 2020, 10:27 a.m. UTC | #2
On Wed, 9 Sep 2020 18:59:45 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

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

> 

> A nice simple binding.  Only real different from txt is that I dropped

> some descriptions where the naming of the parameter was self explanatory

> 

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

> Cc: Haibo Chen <haibo.chen@freescale.com>

> Cc: Shawn Guo <shawnguo@kernel.org>

> Cc: Sascha Hauer <s.hauer@pengutronix.de>

Update Haibo Chen's email address. I'll also fix it whilst applying the
patch if this version goes in!

Thanks,

Jonathan

> ---

>  .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++

>  .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------

>  2 files changed, 62 insertions(+), 24 deletions(-)

> 

> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml

> new file mode 100644

> index 000000000000..dc5eacb38046

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml

> @@ -0,0 +1,62 @@

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

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml#

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

> +

> +title: Freescale ADC found on the imx7d SoC

> +

> +maintainers:

> +  - Haibo Chen <haibo.chen@freescale.com>

> +

> +properties:

> +  compatible:

> +    const: fsl,imx7d-adc

> +

> +  reg:

> +    maxItems: 1

> +

> +  interrupts:

> +    maxItems: 1

> +

> +  clocks:

> +    maxItems: 1

> +

> +  clock-names:

> +    const: adc

> +

> +  vref-supply: true

> +

> +  "#io-channel-cells":

> +    const: 1

> +

> +required:

> +  - compatible

> +  - reg

> +  - interrupts

> +  - clocks

> +  - clock-names

> +  - vref-supply

> +  - "#io-channel-cells"

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    #include <dt-bindings/interrupt-controller/irq.h>

> +    #include <dt-bindings/clock/imx7d-clock.h>

> +    #include <dt-bindings/interrupt-controller/arm-gic.h>

> +    soc {

> +        #address-cells = <1>;

> +        #size-cells = <1>;

> +        adc@30610000 {

> +            compatible = "fsl,imx7d-adc";

> +            reg = <0x30610000 0x10000>;

> +            interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

> +            clocks = <&clks IMX7D_ADC_ROOT_CLK>;

> +            clock-names = "adc";

> +            vref-supply = <&reg_vcc_3v3_mcu>;

> +            #io-channel-cells = <1>;

> +        };

> +    };

> +...

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

> deleted file mode 100644

> index f1f3a552459b..000000000000

> --- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt

> +++ /dev/null

> @@ -1,24 +0,0 @@

> -Freescale imx7d ADC bindings

> -

> -The devicetree bindings are for the ADC driver written for

> -imx7d SoC.

> -

> -Required properties:

> -- compatible: Should be "fsl,imx7d-adc"

> -- reg: Offset and length of the register set for the ADC device

> -- interrupts: The interrupt number for the ADC device

> -- clocks: The root clock of the ADC controller

> -- clock-names: Must contain "adc", matching entry in the clocks property

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

> -- #io-channel-cells: Must be 1 as per ../iio-bindings.txt

> -

> -Example:

> -adc1: adc@30610000 {

> -	compatible = "fsl,imx7d-adc";

> -	reg = <0x30610000 0x10000>;

> -	interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

> -	clocks = <&clks IMX7D_ADC_ROOT_CLK>;

> -	clock-names = "adc";

> -	vref-supply = <&reg_vcc_3v3_mcu>;

> -	#io-channel-cells = <1>;

> -};
Jonathan Cameron Sept. 19, 2020, 2:14 p.m. UTC | #3
On Wed, 16 Sep 2020 11:27:21 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Wed, 9 Sep 2020 18:59:45 +0100

> Jonathan Cameron <jic23@kernel.org> wrote:

> 

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

> > 

> > A nice simple binding.  Only real different from txt is that I dropped

> > some descriptions where the naming of the parameter was self explanatory

> > 

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

> > Cc: Haibo Chen <haibo.chen@freescale.com>

> > Cc: Shawn Guo <shawnguo@kernel.org>

> > Cc: Sascha Hauer <s.hauer@pengutronix.de>  

> Update Haibo Chen's email address. I'll also fix it whilst applying the

> patch if this version goes in!

Applied with that updated address for Haibo Chen.

thanks,

Jonathan

> 

> Thanks,

> 

> Jonathan

> 

> > ---

> >  .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++

> >  .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------

> >  2 files changed, 62 insertions(+), 24 deletions(-)

> > 

> > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml

> > new file mode 100644

> > index 000000000000..dc5eacb38046

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml

> > @@ -0,0 +1,62 @@

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

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml#

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

> > +

> > +title: Freescale ADC found on the imx7d SoC

> > +

> > +maintainers:

> > +  - Haibo Chen <haibo.chen@freescale.com>

> > +

> > +properties:

> > +  compatible:

> > +    const: fsl,imx7d-adc

> > +

> > +  reg:

> > +    maxItems: 1

> > +

> > +  interrupts:

> > +    maxItems: 1

> > +

> > +  clocks:

> > +    maxItems: 1

> > +

> > +  clock-names:

> > +    const: adc

> > +

> > +  vref-supply: true

> > +

> > +  "#io-channel-cells":

> > +    const: 1

> > +

> > +required:

> > +  - compatible

> > +  - reg

> > +  - interrupts

> > +  - clocks

> > +  - clock-names

> > +  - vref-supply

> > +  - "#io-channel-cells"

> > +

> > +additionalProperties: false

> > +

> > +examples:

> > +  - |

> > +    #include <dt-bindings/interrupt-controller/irq.h>

> > +    #include <dt-bindings/clock/imx7d-clock.h>

> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>

> > +    soc {

> > +        #address-cells = <1>;

> > +        #size-cells = <1>;

> > +        adc@30610000 {

> > +            compatible = "fsl,imx7d-adc";

> > +            reg = <0x30610000 0x10000>;

> > +            interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

> > +            clocks = <&clks IMX7D_ADC_ROOT_CLK>;

> > +            clock-names = "adc";

> > +            vref-supply = <&reg_vcc_3v3_mcu>;

> > +            #io-channel-cells = <1>;

> > +        };

> > +    };

> > +...

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

> > deleted file mode 100644

> > index f1f3a552459b..000000000000

> > --- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt

> > +++ /dev/null

> > @@ -1,24 +0,0 @@

> > -Freescale imx7d ADC bindings

> > -

> > -The devicetree bindings are for the ADC driver written for

> > -imx7d SoC.

> > -

> > -Required properties:

> > -- compatible: Should be "fsl,imx7d-adc"

> > -- reg: Offset and length of the register set for the ADC device

> > -- interrupts: The interrupt number for the ADC device

> > -- clocks: The root clock of the ADC controller

> > -- clock-names: Must contain "adc", matching entry in the clocks property

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

> > -- #io-channel-cells: Must be 1 as per ../iio-bindings.txt

> > -

> > -Example:

> > -adc1: adc@30610000 {

> > -	compatible = "fsl,imx7d-adc";

> > -	reg = <0x30610000 0x10000>;

> > -	interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

> > -	clocks = <&clks IMX7D_ADC_ROOT_CLK>;

> > -	clock-names = "adc";

> > -	vref-supply = <&reg_vcc_3v3_mcu>;

> > -	#io-channel-cells = <1>;

> > -};  

> 

>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
new file mode 100644
index 000000000000..dc5eacb38046
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
@@ -0,0 +1,62 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale ADC found on the imx7d SoC
+
+maintainers:
+  - Haibo Chen <haibo.chen@freescale.com>
+
+properties:
+  compatible:
+    const: fsl,imx7d-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: adc
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/imx7d-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@30610000 {
+            compatible = "fsl,imx7d-adc";
+            reg = <0x30610000 0x10000>;
+            interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&clks IMX7D_ADC_ROOT_CLK>;
+            clock-names = "adc";
+            vref-supply = <&reg_vcc_3v3_mcu>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt b/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
deleted file mode 100644
index f1f3a552459b..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
+++ /dev/null
@@ -1,24 +0,0 @@ 
-Freescale imx7d ADC bindings
-
-The devicetree bindings are for the ADC driver written for
-imx7d SoC.
-
-Required properties:
-- compatible: Should be "fsl,imx7d-adc"
-- reg: Offset and length of the register set for the ADC device
-- interrupts: The interrupt number for the ADC device
-- clocks: The root clock of the ADC controller
-- clock-names: Must contain "adc", matching entry in the clocks property
-- vref-supply: The regulator supply ADC reference voltage
-- #io-channel-cells: Must be 1 as per ../iio-bindings.txt
-
-Example:
-adc1: adc@30610000 {
-	compatible = "fsl,imx7d-adc";
-	reg = <0x30610000 0x10000>;
-	interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&clks IMX7D_ADC_ROOT_CLK>;
-	clock-names = "adc";
-	vref-supply = <&reg_vcc_3v3_mcu>;
-	#io-channel-cells = <1>;
-};