diff mbox series

[1/4] dt-bindings: touchscreen: convert neonode,zforce to json-schema

Message ID 20230815182948.212575-2-andreas@kemnade.info (mailing list archive)
State New, archived
Headers show
Series Input: zforce_ts: standard properties | expand

Commit Message

Andreas Kemnade Aug. 15, 2023, 6:29 p.m. UTC
Convert Neonode infrared touchscreen controller binding to DT schema.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 .../input/touchscreen/neonode,zforce.yaml     | 67 +++++++++++++++++++
 .../bindings/input/touchscreen/zforce_ts.txt  | 34 ----------
 2 files changed, 67 insertions(+), 34 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt

Comments

Conor Dooley Aug. 16, 2023, 2:52 p.m. UTC | #1
On Tue, Aug 15, 2023 at 08:29:45PM +0200, Andreas Kemnade wrote:
> Convert Neonode infrared touchscreen controller binding to DT schema.
> 
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
>  .../input/touchscreen/neonode,zforce.yaml     | 67 +++++++++++++++++++
>  .../bindings/input/touchscreen/zforce_ts.txt  | 34 ----------
>  2 files changed, 67 insertions(+), 34 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
>  delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> new file mode 100644
> index 000000000000..1c45adb2407a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Neonode infrared touchscreen controller
> +
> +maintainers:
> +  - Heiko Stuebner <heiko.stuebner@bqreaders.com>

It;d be good to CC the person you're volunteering! I've done so.

> +
> +properties:
> +  compatible:
> +    const: neonode,zforce
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  irq-gpios:
> +    maxItems: 1
> +
> +  x-size:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  y-size:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  vdd-supply: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - reset-gpios
> +  - x-size
> +  - y-size
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        touchscreen@50 {
> +            compatible = "neonode,zforce";
> +            reg = <0x50>;
> +            interrupts = <2 0>;
> +            vdd-supply = <&reg_zforce_vdd>;
> +
> +            reset-gpios = <&gpio5 9 0>; /* RST */
> +            irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
> +
> +            x-size = <800>;
> +            y-size = <600>;
> +        };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> deleted file mode 100644
> index e3c27c4fd9c8..000000000000
> --- a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -* Neonode infrared touchscreen controller
> -
> -Required properties:
> -- compatible: must be "neonode,zforce"
> -- reg: I2C address of the chip
> -- interrupts: interrupt to which the chip is connected
> -- reset-gpios: reset gpio the chip is connected to
> -- x-size: horizontal resolution of touchscreen
> -- y-size: vertical resolution of touchscreen
> -
> -Optional properties:
> -- irq-gpios : interrupt gpio the chip is connected to
> -- vdd-supply: Regulator controlling the controller supply
> -
> -Example:
> -
> -	i2c@00000000 {
> -		/* ... */
> -
> -		zforce_ts@50 {
> -			compatible = "neonode,zforce";
> -			reg = <0x50>;
> -			interrupts = <2 0>;
> -			vdd-supply = <&reg_zforce_vdd>;
> -
> -			reset-gpios = <&gpio5 9 0>; /* RST */
> -			irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
> -
> -			x-size = <800>;
> -			y-size = <600>;
> -		};
> -
> -		/* ... */
> -	};
> -- 
> 2.39.2
>
Heiko Stübner Aug. 16, 2023, 5:18 p.m. UTC | #2
Hi,

Am Mittwoch, 16. August 2023, 16:52:16 CEST schrieb Conor Dooley:
> On Tue, Aug 15, 2023 at 08:29:45PM +0200, Andreas Kemnade wrote:
> > Convert Neonode infrared touchscreen controller binding to DT schema.
> > 
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> >  .../input/touchscreen/neonode,zforce.yaml     | 67 +++++++++++++++++++
> >  .../bindings/input/touchscreen/zforce_ts.txt  | 34 ----------
> >  2 files changed, 67 insertions(+), 34 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > new file mode 100644
> > index 000000000000..1c45adb2407a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > @@ -0,0 +1,67 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Neonode infrared touchscreen controller
> > +
> > +maintainers:
> > +  - Heiko Stuebner <heiko.stuebner@bqreaders.com>
> 
> It;d be good to CC the person you're volunteering! I've done so.

BQ the company is no more. So I have no issue with me being in there,
afterall I did that driver back then, but I guess my main and permanent
address of heiko@sntech.de might be more appropriate :-)

Heiko


> > +
> > +properties:
> > +  compatible:
> > +    const: neonode,zforce
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  reset-gpios:
> > +    maxItems: 1
> > +
> > +  irq-gpios:
> > +    maxItems: 1
> > +
> > +  x-size:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > +  y-size:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > +  vdd-supply: true
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - reset-gpios
> > +  - x-size
> > +  - y-size
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        touchscreen@50 {
> > +            compatible = "neonode,zforce";
> > +            reg = <0x50>;
> > +            interrupts = <2 0>;
> > +            vdd-supply = <&reg_zforce_vdd>;
> > +
> > +            reset-gpios = <&gpio5 9 0>; /* RST */
> > +            irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
> > +
> > +            x-size = <800>;
> > +            y-size = <600>;
> > +        };
> > +    };
> > +...
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> > deleted file mode 100644
> > index e3c27c4fd9c8..000000000000
> > --- a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> > +++ /dev/null
> > @@ -1,34 +0,0 @@
> > -* Neonode infrared touchscreen controller
> > -
> > -Required properties:
> > -- compatible: must be "neonode,zforce"
> > -- reg: I2C address of the chip
> > -- interrupts: interrupt to which the chip is connected
> > -- reset-gpios: reset gpio the chip is connected to
> > -- x-size: horizontal resolution of touchscreen
> > -- y-size: vertical resolution of touchscreen
> > -
> > -Optional properties:
> > -- irq-gpios : interrupt gpio the chip is connected to
> > -- vdd-supply: Regulator controlling the controller supply
> > -
> > -Example:
> > -
> > -	i2c@00000000 {
> > -		/* ... */
> > -
> > -		zforce_ts@50 {
> > -			compatible = "neonode,zforce";
> > -			reg = <0x50>;
> > -			interrupts = <2 0>;
> > -			vdd-supply = <&reg_zforce_vdd>;
> > -
> > -			reset-gpios = <&gpio5 9 0>; /* RST */
> > -			irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
> > -
> > -			x-size = <800>;
> > -			y-size = <600>;
> > -		};
> > -
> > -		/* ... */
> > -	};
>
Andreas Kemnade Aug. 16, 2023, 5:20 p.m. UTC | #3
On Wed, 16 Aug 2023 15:52:16 +0100
Conor Dooley <conor@kernel.org> wrote:

> On Tue, Aug 15, 2023 at 08:29:45PM +0200, Andreas Kemnade wrote:
> > Convert Neonode infrared touchscreen controller binding to DT schema.
> > 
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> >  .../input/touchscreen/neonode,zforce.yaml     | 67 +++++++++++++++++++
> >  .../bindings/input/touchscreen/zforce_ts.txt  | 34 ----------
> >  2 files changed, 67 insertions(+), 34 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > new file mode 100644
> > index 000000000000..1c45adb2407a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > @@ -0,0 +1,67 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Neonode infrared touchscreen controller
> > +
> > +maintainers:
> > +  - Heiko Stuebner <heiko.stuebner@bqreaders.com>  
> 
> It;d be good to CC the person you're volunteering! I've done so.
> 
well, apparently my get_maintainer.pl | confirm_and_add_addresses | git send-email
script did not run in the kernel checkout I applied the patch to, so it did
not catch that address. Sorry. BTW: What is common practice for the maintainer address
in the binding in conversions? Here I looked at the commits of the plaintext binding.

Regards,
Andreas
Conor Dooley Aug. 16, 2023, 5:55 p.m. UTC | #4
On Wed, Aug 16, 2023 at 07:20:49PM +0200, Andreas Kemnade wrote:
> On Wed, 16 Aug 2023 15:52:16 +0100
> Conor Dooley <conor@kernel.org> wrote:
> 
> > On Tue, Aug 15, 2023 at 08:29:45PM +0200, Andreas Kemnade wrote:
> > > Convert Neonode infrared touchscreen controller binding to DT schema.
> > > 
> > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > > ---
> > >  .../input/touchscreen/neonode,zforce.yaml     | 67 +++++++++++++++++++
> > >  .../bindings/input/touchscreen/zforce_ts.txt  | 34 ----------
> > >  2 files changed, 67 insertions(+), 34 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > > new file mode 100644
> > > index 000000000000..1c45adb2407a
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
> > > @@ -0,0 +1,67 @@
> > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Neonode infrared touchscreen controller
> > > +
> > > +maintainers:
> > > +  - Heiko Stuebner <heiko.stuebner@bqreaders.com>  
> > 
> > It;d be good to CC the person you're volunteering! I've done so.
> > 
> well, apparently my get_maintainer.pl | confirm_and_add_addresses | git send-email
> script did not run in the kernel checkout I applied the patch to, so it did
> not catch that address. Sorry.

> BTW: What is common practice for the maintainer address
> in the binding in conversions? Here I looked at the commits of the plaintext binding.

Yeah, that seems reasonable to me.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
new file mode 100644
index 000000000000..1c45adb2407a
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/neonode,zforce.yaml
@@ -0,0 +1,67 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Neonode infrared touchscreen controller
+
+maintainers:
+  - Heiko Stuebner <heiko.stuebner@bqreaders.com>
+
+properties:
+  compatible:
+    const: neonode,zforce
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  irq-gpios:
+    maxItems: 1
+
+  x-size:
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  y-size:
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  vdd-supply: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - reset-gpios
+  - x-size
+  - y-size
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        touchscreen@50 {
+            compatible = "neonode,zforce";
+            reg = <0x50>;
+            interrupts = <2 0>;
+            vdd-supply = <&reg_zforce_vdd>;
+
+            reset-gpios = <&gpio5 9 0>; /* RST */
+            irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
+
+            x-size = <800>;
+            y-size = <600>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
deleted file mode 100644
index e3c27c4fd9c8..000000000000
--- a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
+++ /dev/null
@@ -1,34 +0,0 @@ 
-* Neonode infrared touchscreen controller
-
-Required properties:
-- compatible: must be "neonode,zforce"
-- reg: I2C address of the chip
-- interrupts: interrupt to which the chip is connected
-- reset-gpios: reset gpio the chip is connected to
-- x-size: horizontal resolution of touchscreen
-- y-size: vertical resolution of touchscreen
-
-Optional properties:
-- irq-gpios : interrupt gpio the chip is connected to
-- vdd-supply: Regulator controlling the controller supply
-
-Example:
-
-	i2c@00000000 {
-		/* ... */
-
-		zforce_ts@50 {
-			compatible = "neonode,zforce";
-			reg = <0x50>;
-			interrupts = <2 0>;
-			vdd-supply = <&reg_zforce_vdd>;
-
-			reset-gpios = <&gpio5 9 0>; /* RST */
-			irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
-
-			x-size = <800>;
-			y-size = <600>;
-		};
-
-		/* ... */
-	};