diff mbox series

[v2,12/20] dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion

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


This is a small part of an MFD so perhaps ultimately it makes more
sense to document it with that MFD binding rather than separately.

In the meantime it's a straightforward conversion from txt to yaml.

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

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

---
 .../bindings/iio/adc/da9150-gpadc.txt         | 16 ---------
 .../bindings/iio/adc/dlg,da9150-gpadc.yaml    | 33 +++++++++++++++++++
 2 files changed, 33 insertions(+), 16 deletions(-)

-- 
2.28.0

Comments

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

> 

> This is a small part of an MFD so perhaps ultimately it makes more

> sense to document it with that MFD binding rather than separately.

> 

> In the meantime it's a straightforward conversion from txt to yaml.

> 

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

> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> ---

>  .../bindings/iio/adc/da9150-gpadc.txt         | 16 ---------

>  .../bindings/iio/adc/dlg,da9150-gpadc.yaml    | 33 +++++++++++++++++++

>  2 files changed, 33 insertions(+), 16 deletions(-)

> 

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

> deleted file mode 100644

> index c07228da92ac..000000000000

> --- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt

> +++ /dev/null

> @@ -1,16 +0,0 @@

> -Dialog Semiconductor DA9150 IIO GPADC bindings

> -

> -Required properties:

> -- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC

> -- #io-channel-cells: Should be set to <1>

> -  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)

> -

> -For further information on GPADC channels, see device datasheet.

> -

> -

> -Example:

> -

> -	gpadc: da9150-gpadc {

> -		compatible = "dlg,da9150-gpadc";

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

> -	};

> diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml

> new file mode 100644

> index 000000000000..15c51d337108

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml

> @@ -0,0 +1,33 @@

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

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml#

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

> +

> +title: Dialog Semiconductor DA9150 IIO GPADC

> +

> +maintainers:

> +  - Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> +

> +description:

> +  This patch adds support for general purpose ADC within the

> +  DA9150 Charger & Fuel-Gauge IC.

> +

> +properties:

> +  compatible:

> +    const: dlg,da9150-gpadc

> +

> +  "#io-channel-cells":

> +    const: 1

> +

> +required:

> +  - compatible

> +  - "#io-channel-cells"


additionalProperties...

With that,

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


> +

> +examples:

> +  - |

> +    adc {

> +        compatible = "dlg,da9150-gpadc";

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

> +    };

> +...

> -- 

> 2.28.0

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

> On Wed, Sep 09, 2020 at 06:59:38PM +0100, Jonathan Cameron wrote:

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

> > 

> > This is a small part of an MFD so perhaps ultimately it makes more

> > sense to document it with that MFD binding rather than separately.

> > 

> > In the meantime it's a straightforward conversion from txt to yaml.

> > 

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

> > Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> > ---

> >  .../bindings/iio/adc/da9150-gpadc.txt         | 16 ---------

> >  .../bindings/iio/adc/dlg,da9150-gpadc.yaml    | 33 +++++++++++++++++++

> >  2 files changed, 33 insertions(+), 16 deletions(-)

> > 

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

> > deleted file mode 100644

> > index c07228da92ac..000000000000

> > --- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt

> > +++ /dev/null

> > @@ -1,16 +0,0 @@

> > -Dialog Semiconductor DA9150 IIO GPADC bindings

> > -

> > -Required properties:

> > -- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC

> > -- #io-channel-cells: Should be set to <1>

> > -  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)

> > -

> > -For further information on GPADC channels, see device datasheet.

> > -

> > -

> > -Example:

> > -

> > -	gpadc: da9150-gpadc {

> > -		compatible = "dlg,da9150-gpadc";

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

> > -	};

> > diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml

> > new file mode 100644

> > index 000000000000..15c51d337108

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml

> > @@ -0,0 +1,33 @@

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

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml#

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

> > +

> > +title: Dialog Semiconductor DA9150 IIO GPADC

> > +

> > +maintainers:

> > +  - Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> > +

> > +description:

> > +  This patch adds support for general purpose ADC within the

> > +  DA9150 Charger & Fuel-Gauge IC.

> > +

> > +properties:

> > +  compatible:

> > +    const: dlg,da9150-gpadc

> > +

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

> > +    const: 1

> > +

> > +required:

> > +  - compatible

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

> 

> additionalProperties...

> 

One day I'll remember to check this in all my patches! Sorry about that.
Fixed.
> With that,

> 

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

Applied
> 

> > +

> > +examples:

> > +  - |

> > +    adc {

> > +        compatible = "dlg,da9150-gpadc";

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

> > +    };

> > +...

> > -- 

> > 2.28.0

> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
deleted file mode 100644
index c07228da92ac..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
+++ /dev/null
@@ -1,16 +0,0 @@ 
-Dialog Semiconductor DA9150 IIO GPADC bindings
-
-Required properties:
-- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC
-- #io-channel-cells: Should be set to <1>
-  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)
-
-For further information on GPADC channels, see device datasheet.
-
-
-Example:
-
-	gpadc: da9150-gpadc {
-		compatible = "dlg,da9150-gpadc";
-		#io-channel-cells = <1>;
-	};
diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
new file mode 100644
index 000000000000..15c51d337108
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
@@ -0,0 +1,33 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dialog Semiconductor DA9150 IIO GPADC
+
+maintainers:
+  - Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
+
+description:
+  This patch adds support for general purpose ADC within the
+  DA9150 Charger & Fuel-Gauge IC.
+
+properties:
+  compatible:
+    const: dlg,da9150-gpadc
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - "#io-channel-cells"
+
+examples:
+  - |
+    adc {
+        compatible = "dlg,da9150-gpadc";
+        #io-channel-cells = <1>;
+    };
+...