diff mbox series

[14/46] dt-bindings:iio:light:avago,apds9960: txt to yaml conversion

Message ID 20201031184854.745828-15-jic23@kernel.org
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>

Very simple binding that we could move into trivial-devices.yaml
with a small loss of documentation.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matt Ranostay <mranostay@gmail.com>
---
 .../bindings/iio/light/apds9960.txt           | 21 ---------
 .../bindings/iio/light/avago,apds9960.yaml    | 44 +++++++++++++++++++
 2 files changed, 44 insertions(+), 21 deletions(-)

Comments

Matt Ranostay Oct. 31, 2020, 9:33 p.m. UTC | #1
On Sat, Oct 31, 2020 at 11:51 AM Jonathan Cameron <jic23@kernel.org> wrote:
>

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

>

> Very simple binding that we could move into trivial-devices.yaml

> with a small loss of documentation.

>

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

> Cc: Matt Ranostay <mranostay@gmail.com>


Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>


> ---

>  .../bindings/iio/light/apds9960.txt           | 21 ---------

>  .../bindings/iio/light/avago,apds9960.yaml    | 44 +++++++++++++++++++

>  2 files changed, 44 insertions(+), 21 deletions(-)

>

> diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt

> deleted file mode 100644

> index c53ddb81c4aa..000000000000

> --- a/Documentation/devicetree/bindings/iio/light/apds9960.txt

> +++ /dev/null

> @@ -1,21 +0,0 @@

> -* Avago APDS9960 gesture/RGB/ALS/proximity sensor

> -

> -https://www.avagotech.com/docs/AV02-4191EN

> -

> -Required properties:

> -

> -  - compatible: must be "avago,apds9960"

> -  - reg: the I2c address of the sensor

> -  - interrupts : the sole interrupt generated by the device

> -

> -  Refer to interrupt-controller/interrupts.txt for generic interrupt client

> -  node bindings.

> -

> -Example:

> -

> -apds9960@39 {

> -       compatible = "avago,apds9960";

> -       reg = <0x39>;

> -       interrupt-parent = <&gpio1>;

> -       interrupts = <16 1>;

> -};

> diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml

> new file mode 100644

> index 000000000000..eae8c7327c0f

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml

> @@ -0,0 +1,44 @@

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

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml#

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

> +

> +title: Avago APDS9960 gesture/RGB/ALS/proximity sensor

> +

> +maintainers:

> +  - Matt Ranostay <mranostay@gmail.com>

> +

> +description: |

> +  Datasheet at https://www.avagotech.com/docs/AV02-4191EN

> +

> +properties:

> +  compatible:

> +    const: avago,apds9960

> +

> +  reg:

> +    maxItems: 1

> +

> +  interrupts:

> +    maxItems: 1

> +

> +additionalProperties: false

> +

> +required:

> +  - compatible

> +  - reg

> +

> +examples:

> +  - |

> +    i2c {

> +        #address-cells = <1>;

> +        #size-cells = <0>;

> +

> +        light-sensor@39 {

> +            compatible = "avago,apds9960";

> +            reg = <0x39>;

> +            interrupt-parent = <&gpio1>;

> +            interrupts = <16 1>;

> +        };

> +    };

> +...

> --

> 2.28.0

>
Matt Ranostay Oct. 31, 2020, 9:35 p.m. UTC | #2
On Sat, Oct 31, 2020 at 2:33 PM Matt Ranostay
<matt.ranostay@konsulko.com> wrote:
>

> On Sat, Oct 31, 2020 at 11:51 AM Jonathan Cameron <jic23@kernel.org> wrote:

> >

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

> >

> > Very simple binding that we could move into trivial-devices.yaml

> > with a small loss of documentation.

> >

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

> > Cc: Matt Ranostay <mranostay@gmail.com>

>

> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>


Actually still Acked-by but could you change my email below to my Konsulko one?

Thanks,

Matt

> > ---

> >  .../bindings/iio/light/apds9960.txt           | 21 ---------

> >  .../bindings/iio/light/avago,apds9960.yaml    | 44 +++++++++++++++++++

> >  2 files changed, 44 insertions(+), 21 deletions(-)

> >

> > diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt

> > deleted file mode 100644

> > index c53ddb81c4aa..000000000000

> > --- a/Documentation/devicetree/bindings/iio/light/apds9960.txt

> > +++ /dev/null

> > @@ -1,21 +0,0 @@

> > -* Avago APDS9960 gesture/RGB/ALS/proximity sensor

> > -

> > -https://www.avagotech.com/docs/AV02-4191EN

> > -

> > -Required properties:

> > -

> > -  - compatible: must be "avago,apds9960"

> > -  - reg: the I2c address of the sensor

> > -  - interrupts : the sole interrupt generated by the device

> > -

> > -  Refer to interrupt-controller/interrupts.txt for generic interrupt client

> > -  node bindings.

> > -

> > -Example:

> > -

> > -apds9960@39 {

> > -       compatible = "avago,apds9960";

> > -       reg = <0x39>;

> > -       interrupt-parent = <&gpio1>;

> > -       interrupts = <16 1>;

> > -};

> > diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml

> > new file mode 100644

> > index 000000000000..eae8c7327c0f

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml

> > @@ -0,0 +1,44 @@

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

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml#

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

> > +

> > +title: Avago APDS9960 gesture/RGB/ALS/proximity sensor

> > +

> > +maintainers:

> > +  - Matt Ranostay <mranostay@gmail.com>

> > +

> > +description: |

> > +  Datasheet at https://www.avagotech.com/docs/AV02-4191EN

> > +

> > +properties:

> > +  compatible:

> > +    const: avago,apds9960

> > +

> > +  reg:

> > +    maxItems: 1

> > +

> > +  interrupts:

> > +    maxItems: 1

> > +

> > +additionalProperties: false

> > +

> > +required:

> > +  - compatible

> > +  - reg

> > +

> > +examples:

> > +  - |

> > +    i2c {

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

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

> > +

> > +        light-sensor@39 {

> > +            compatible = "avago,apds9960";

> > +            reg = <0x39>;

> > +            interrupt-parent = <&gpio1>;

> > +            interrupts = <16 1>;

> > +        };

> > +    };

> > +...

> > --

> > 2.28.0

> >
Jonathan Cameron Nov. 1, 2020, 2:57 p.m. UTC | #3
On Sat, 31 Oct 2020 14:35:56 -0700
Matt Ranostay <matt.ranostay@konsulko.com> wrote:

> On Sat, Oct 31, 2020 at 2:33 PM Matt Ranostay

> <matt.ranostay@konsulko.com> wrote:

> >

> > On Sat, Oct 31, 2020 at 11:51 AM Jonathan Cameron <jic23@kernel.org> wrote:  

> > >

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

> > >

> > > Very simple binding that we could move into trivial-devices.yaml

> > > with a small loss of documentation.

> > >

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

> > > Cc: Matt Ranostay <mranostay@gmail.com>  

> >

> > Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>  

> 

> Actually still Acked-by but could you change my email below to my Konsulko one?

Will do.

> 

> Thanks,

> 

> Matt

> 

> > > ---

> > >  .../bindings/iio/light/apds9960.txt           | 21 ---------

> > >  .../bindings/iio/light/avago,apds9960.yaml    | 44 +++++++++++++++++++

> > >  2 files changed, 44 insertions(+), 21 deletions(-)

> > >

> > > diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt

> > > deleted file mode 100644

> > > index c53ddb81c4aa..000000000000

> > > --- a/Documentation/devicetree/bindings/iio/light/apds9960.txt

> > > +++ /dev/null

> > > @@ -1,21 +0,0 @@

> > > -* Avago APDS9960 gesture/RGB/ALS/proximity sensor

> > > -

> > > -https://www.avagotech.com/docs/AV02-4191EN

> > > -

> > > -Required properties:

> > > -

> > > -  - compatible: must be "avago,apds9960"

> > > -  - reg: the I2c address of the sensor

> > > -  - interrupts : the sole interrupt generated by the device

> > > -

> > > -  Refer to interrupt-controller/interrupts.txt for generic interrupt client

> > > -  node bindings.

> > > -

> > > -Example:

> > > -

> > > -apds9960@39 {

> > > -       compatible = "avago,apds9960";

> > > -       reg = <0x39>;

> > > -       interrupt-parent = <&gpio1>;

> > > -       interrupts = <16 1>;

> > > -};

> > > diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml

> > > new file mode 100644

> > > index 000000000000..eae8c7327c0f

> > > --- /dev/null

> > > +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml

> > > @@ -0,0 +1,44 @@

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

> > > +%YAML 1.2

> > > +---

> > > +$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml#

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

> > > +

> > > +title: Avago APDS9960 gesture/RGB/ALS/proximity sensor

> > > +

> > > +maintainers:

> > > +  - Matt Ranostay <mranostay@gmail.com>

> > > +

> > > +description: |

> > > +  Datasheet at https://www.avagotech.com/docs/AV02-4191EN

> > > +

> > > +properties:

> > > +  compatible:

> > > +    const: avago,apds9960

> > > +

> > > +  reg:

> > > +    maxItems: 1

> > > +

> > > +  interrupts:

> > > +    maxItems: 1

> > > +

> > > +additionalProperties: false

> > > +

> > > +required:

> > > +  - compatible

> > > +  - reg

> > > +

> > > +examples:

> > > +  - |

> > > +    i2c {

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

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

> > > +

> > > +        light-sensor@39 {

> > > +            compatible = "avago,apds9960";

> > > +            reg = <0x39>;

> > > +            interrupt-parent = <&gpio1>;

> > > +            interrupts = <16 1>;

> > > +        };

> > > +    };

> > > +...

> > > --

> > > 2.28.0

> > >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt
deleted file mode 100644
index c53ddb81c4aa..000000000000
--- a/Documentation/devicetree/bindings/iio/light/apds9960.txt
+++ /dev/null
@@ -1,21 +0,0 @@ 
-* Avago APDS9960 gesture/RGB/ALS/proximity sensor
-
-https://www.avagotech.com/docs/AV02-4191EN
-
-Required properties:
-
-  - compatible: must be "avago,apds9960"
-  - reg: the I2c address of the sensor
-  - interrupts : the sole interrupt generated by the device
-
-  Refer to interrupt-controller/interrupts.txt for generic interrupt client
-  node bindings.
-
-Example:
-
-apds9960@39 {
-	compatible = "avago,apds9960";
-	reg = <0x39>;
-	interrupt-parent = <&gpio1>;
-	interrupts = <16 1>;
-};
diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml
new file mode 100644
index 000000000000..eae8c7327c0f
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml
@@ -0,0 +1,44 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Avago APDS9960 gesture/RGB/ALS/proximity sensor
+
+maintainers:
+  - Matt Ranostay <mranostay@gmail.com>
+
+description: |
+  Datasheet at https://www.avagotech.com/docs/AV02-4191EN
+
+properties:
+  compatible:
+    const: avago,apds9960
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        light-sensor@39 {
+            compatible = "avago,apds9960";
+            reg = <0x39>;
+            interrupt-parent = <&gpio1>;
+            interrupts = <16 1>;
+        };
+    };
+...