LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml
@ 2020-03-03 17:25 Dafna Hirschfeld
  2020-03-10 21:14 ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-03-03 17:25 UTC (permalink / raw)
  To: devicetree
  Cc: nick, dmitry.torokhov, robh+dt, mark.rutland, nicolas.ferre,
	alexandre.belloni, ludovic.desroches, linux-input, linux-kernel,
	enric.balletbo, dafna.hirschfeld, helen.koike, ezequiel, kernel,
	dafna3

Convert the binding file atmel,maxtouch.txt to yaml format.
Also change the file name in the MAINTAINERS file.

This was tested and verified on ARM and ARM64 with:

make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
 .../bindings/input/atmel,maxtouch.txt         | 41 ------------
 .../bindings/input/atmel,maxtouch.yaml        | 64 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 65 insertions(+), 42 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
 create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml

diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
deleted file mode 100644
index c88919480d37..000000000000
--- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-Atmel maXTouch touchscreen/touchpad
-
-Required properties:
-- compatible:
-    atmel,maxtouch
-
-    The following compatibles have been used in various products but are
-    deprecated:
-	atmel,qt602240_ts
-	atmel,atmel_mxt_ts
-	atmel,atmel_mxt_tp
-	atmel,mXT224
-
-- reg: The I2C address of the device
-
-- interrupts: The sink for the touchpad's IRQ output
-    See ../interrupt-controller/interrupts.txt
-
-Optional properties for main touchpad device:
-
-- linux,gpio-keymap: When enabled, the SPT_GPIOPWN_T19 object sends messages
-    on GPIO bit changes. An array of up to 8 entries can be provided
-    indicating the Linux keycode mapped to each bit of the status byte,
-    starting at the LSB. Linux keycodes are defined in
-    <dt-bindings/input/input.h>.
-
-    Note: the numbering of the GPIOs and the bit they start at varies between
-    maXTouch devices. You must either refer to the documentation, or
-    experiment to determine which bit corresponds to which input. Use
-    KEY_RESERVED for unused padding values.
-
-- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
-
-Example:
-
-	touch@4b {
-		compatible = "atmel,maxtouch";
-		reg = <0x4b>;
-		interrupt-parent = <&gpio>;
-		interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
-	};
diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
new file mode 100644
index 000000000000..024dc4ded4f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel maXTouch touchscreen/touchpad
+
+maintainers:
+  - Nick Dyer <nick@shmanahar.org>
+
+description: |
+  Atmel maXTouch touchscreen/touchpad
+
+properties:
+  compatible:
+    const: atmel,maxtouch
+
+  reg:
+    description: The I2C address of the device
+    maxItems: 1
+
+  interrupts:
+    description: The sink for the touchpad's IRQ output
+
+  linux,gpio-keymap:
+    description:
+      When enabled, the SPT_GPIOPWN_T19 object sends messages
+      on GPIO bit changes. An array of up to 8 entries can be provided
+      indicating the Linux keycode mapped to each bit of the status byte,
+      starting at the LSB. Linux keycodes are defined in
+      <dt-bindings/input/input.h>.
+      Note, the numbering of the GPIOs and the bit they start at varies between
+      maXTouch devices. You must either refer to the documentation, or
+      experiment to determine which bit corresponds to which input. Use
+      KEY_RESERVED for unused padding values.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    maxItems: 8
+
+  reset-gpios:
+    description: GPIO specifier for the touchscreen's reset pin (active low)
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: true
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/tegra-gpio.h>
+    i2c {
+          #address-cells = <1>;
+          #size-cells = <0>;
+          touch@4b {
+                compatible = "atmel,maxtouch";
+                reg = <0x4b>;
+                interrupt-parent = <&gpio>;
+                interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
+          };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 46fdb834d1fb..d553aa315734 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2877,7 +2877,7 @@ ATMEL MAXTOUCH DRIVER
 M:	Nick Dyer <nick@shmanahar.org>
 T:	git git://github.com/ndyer/linux.git
 S:	Maintained
-F:	Documentation/devicetree/bindings/input/atmel,maxtouch.txt
+F:	Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
 F:	drivers/input/touchscreen/atmel_mxt_ts.c
 
 ATMEL WIRELESS DRIVER
-- 
2.17.1


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

* Re: [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml
  2020-03-03 17:25 [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml Dafna Hirschfeld
@ 2020-03-10 21:14 ` Rob Herring
  2020-03-11 15:23   ` Dafna Hirschfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2020-03-10 21:14 UTC (permalink / raw)
  To: Dafna Hirschfeld
  Cc: devicetree, nick, dmitry.torokhov, mark.rutland, nicolas.ferre,
	alexandre.belloni, ludovic.desroches, linux-input, linux-kernel,
	enric.balletbo, helen.koike, ezequiel, kernel, dafna3

On Tue, Mar 03, 2020 at 07:25:33PM +0200, Dafna Hirschfeld wrote:
> Convert the binding file atmel,maxtouch.txt to yaml format.
> Also change the file name in the MAINTAINERS file.
> 
> This was tested and verified on ARM and ARM64 with:
> 
> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> ---
>  .../bindings/input/atmel,maxtouch.txt         | 41 ------------
>  .../bindings/input/atmel,maxtouch.yaml        | 64 +++++++++++++++++++
>  MAINTAINERS                                   |  2 +-
>  3 files changed, 65 insertions(+), 42 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>  create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> 
> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> deleted file mode 100644
> index c88919480d37..000000000000
> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -Atmel maXTouch touchscreen/touchpad
> -
> -Required properties:
> -- compatible:
> -    atmel,maxtouch
> -
> -    The following compatibles have been used in various products but are
> -    deprecated:
> -	atmel,qt602240_ts
> -	atmel,atmel_mxt_ts
> -	atmel,atmel_mxt_tp
> -	atmel,mXT224
> -
> -- reg: The I2C address of the device
> -
> -- interrupts: The sink for the touchpad's IRQ output
> -    See ../interrupt-controller/interrupts.txt
> -
> -Optional properties for main touchpad device:
> -
> -- linux,gpio-keymap: When enabled, the SPT_GPIOPWN_T19 object sends messages
> -    on GPIO bit changes. An array of up to 8 entries can be provided
> -    indicating the Linux keycode mapped to each bit of the status byte,
> -    starting at the LSB. Linux keycodes are defined in
> -    <dt-bindings/input/input.h>.
> -
> -    Note: the numbering of the GPIOs and the bit they start at varies between
> -    maXTouch devices. You must either refer to the documentation, or
> -    experiment to determine which bit corresponds to which input. Use
> -    KEY_RESERVED for unused padding values.
> -
> -- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
> -
> -Example:
> -
> -	touch@4b {
> -		compatible = "atmel,maxtouch";
> -		reg = <0x4b>;
> -		interrupt-parent = <&gpio>;
> -		interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
> -	};
> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> new file mode 100644
> index 000000000000..024dc4ded4f3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel maXTouch touchscreen/touchpad
> +
> +maintainers:
> +  - Nick Dyer <nick@shmanahar.org>
> +
> +description: |
> +  Atmel maXTouch touchscreen/touchpad
> +
> +properties:
> +  compatible:
> +    const: atmel,maxtouch
> +
> +  reg:
> +    description: The I2C address of the device
> +    maxItems: 1
> +
> +  interrupts:
> +    description: The sink for the touchpad's IRQ output

How many? Needs 'maxItems: 1'?

You can drop the description.

> +
> +  linux,gpio-keymap:
> +    description:
> +      When enabled, the SPT_GPIOPWN_T19 object sends messages
> +      on GPIO bit changes. An array of up to 8 entries can be provided
> +      indicating the Linux keycode mapped to each bit of the status byte,
> +      starting at the LSB. Linux keycodes are defined in
> +      <dt-bindings/input/input.h>.
> +      Note, the numbering of the GPIOs and the bit they start at varies between
> +      maXTouch devices. You must either refer to the documentation, or
> +      experiment to determine which bit corresponds to which input. Use
> +      KEY_RESERVED for unused padding values.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    maxItems: 8
> +
> +  reset-gpios:
> +    description: GPIO specifier for the touchscreen's reset pin (active low)
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: true

That's the default and we generally want this to be 'false'.

> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/tegra-gpio.h>
> +    i2c {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +          touch@4b {
> +                compatible = "atmel,maxtouch";
> +                reg = <0x4b>;
> +                interrupt-parent = <&gpio>;
> +                interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
> +          };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 46fdb834d1fb..d553aa315734 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2877,7 +2877,7 @@ ATMEL MAXTOUCH DRIVER
>  M:	Nick Dyer <nick@shmanahar.org>
>  T:	git git://github.com/ndyer/linux.git
>  S:	Maintained
> -F:	Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> +F:	Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>  F:	drivers/input/touchscreen/atmel_mxt_ts.c
>  
>  ATMEL WIRELESS DRIVER
> -- 
> 2.17.1
> 

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

* Re: [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml
  2020-03-10 21:14 ` Rob Herring
@ 2020-03-11 15:23   ` Dafna Hirschfeld
  2020-03-11 15:48     ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-03-11 15:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, nick, dmitry.torokhov, mark.rutland, nicolas.ferre,
	alexandre.belloni, ludovic.desroches, linux-input, linux-kernel,
	enric.balletbo, helen.koike, ezequiel, kernel, dafna3

Hi,
Thanks for the review

On 10.03.20 22:14, Rob Herring wrote:
> On Tue, Mar 03, 2020 at 07:25:33PM +0200, Dafna Hirschfeld wrote:
>> Convert the binding file atmel,maxtouch.txt to yaml format.
>> Also change the file name in the MAINTAINERS file.
>>
>> This was tested and verified on ARM and ARM64 with:
>>
>> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>> make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> ---
>>   .../bindings/input/atmel,maxtouch.txt         | 41 ------------
>>   .../bindings/input/atmel,maxtouch.yaml        | 64 +++++++++++++++++++
>>   MAINTAINERS                                   |  2 +-
>>   3 files changed, 65 insertions(+), 42 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>>   create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>> deleted file mode 100644
>> index c88919480d37..000000000000
>> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>> +++ /dev/null
>> @@ -1,41 +0,0 @@
>> -Atmel maXTouch touchscreen/touchpad
>> -
>> -Required properties:
>> -- compatible:
>> -    atmel,maxtouch
>> -
>> -    The following compatibles have been used in various products but are
>> -    deprecated:
>> -	atmel,qt602240_ts
>> -	atmel,atmel_mxt_ts
>> -	atmel,atmel_mxt_tp
>> -	atmel,mXT224
>> -
>> -- reg: The I2C address of the device
>> -
>> -- interrupts: The sink for the touchpad's IRQ output
>> -    See ../interrupt-controller/interrupts.txt
>> -
>> -Optional properties for main touchpad device:
>> -
>> -- linux,gpio-keymap: When enabled, the SPT_GPIOPWN_T19 object sends messages
>> -    on GPIO bit changes. An array of up to 8 entries can be provided
>> -    indicating the Linux keycode mapped to each bit of the status byte,
>> -    starting at the LSB. Linux keycodes are defined in
>> -    <dt-bindings/input/input.h>.
>> -
>> -    Note: the numbering of the GPIOs and the bit they start at varies between
>> -    maXTouch devices. You must either refer to the documentation, or
>> -    experiment to determine which bit corresponds to which input. Use
>> -    KEY_RESERVED for unused padding values.
>> -
>> -- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
>> -
>> -Example:
>> -
>> -	touch@4b {
>> -		compatible = "atmel,maxtouch";
>> -		reg = <0x4b>;
>> -		interrupt-parent = <&gpio>;
>> -		interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
>> -	};
>> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>> new file mode 100644
>> index 000000000000..024dc4ded4f3
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>> @@ -0,0 +1,64 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel maXTouch touchscreen/touchpad
>> +
>> +maintainers:
>> +  - Nick Dyer <nick@shmanahar.org>
>> +
>> +description: |
>> +  Atmel maXTouch touchscreen/touchpad
>> +
>> +properties:
>> +  compatible:
>> +    const: atmel,maxtouch
>> +
>> +  reg:
>> +    description: The I2C address of the device
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    description: The sink for the touchpad's IRQ output
> 
> How many? Needs 'maxItems: 1'> 
> You can drop the description.
> 
>> +
>> +  linux,gpio-keymap:
>> +    description:
>> +      When enabled, the SPT_GPIOPWN_T19 object sends messages
>> +      on GPIO bit changes. An array of up to 8 entries can be provided
>> +      indicating the Linux keycode mapped to each bit of the status byte,
>> +      starting at the LSB. Linux keycodes are defined in
>> +      <dt-bindings/input/input.h>.
>> +      Note, the numbering of the GPIOs and the bit they start at varies between
>> +      maXTouch devices. You must either refer to the documentation, or
>> +      experiment to determine which bit corresponds to which input. Use
>> +      KEY_RESERVED for unused padding values.
>> +    $ref: /schemas/types.yaml#/definitions/uint32-array
>> +    maxItems: 8
>> +
>> +  reset-gpios:
>> +    description: GPIO specifier for the touchscreen's reset pin (active low)
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +
>> +additionalProperties: true
> 
> That's the default and we generally want this to be 'false'.
but many nodes has more properties not described here so I could not
set it to false.

thanks,
Dafna
> 
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +    #include <dt-bindings/gpio/tegra-gpio.h>
>> +    i2c {
>> +          #address-cells = <1>;
>> +          #size-cells = <0>;
>> +          touch@4b {
>> +                compatible = "atmel,maxtouch";
>> +                reg = <0x4b>;
>> +                interrupt-parent = <&gpio>;
>> +                interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
>> +          };
>> +    };
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 46fdb834d1fb..d553aa315734 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -2877,7 +2877,7 @@ ATMEL MAXTOUCH DRIVER
>>   M:	Nick Dyer <nick@shmanahar.org>
>>   T:	git git://github.com/ndyer/linux.git
>>   S:	Maintained
>> -F:	Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>> +F:	Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>   F:	drivers/input/touchscreen/atmel_mxt_ts.c
>>   
>>   ATMEL WIRELESS DRIVER
>> -- 
>> 2.17.1
>>

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

* Re: [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml
  2020-03-11 15:23   ` Dafna Hirschfeld
@ 2020-03-11 15:48     ` Rob Herring
  2020-03-20 15:21       ` Dafna Hirschfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2020-03-11 15:48 UTC (permalink / raw)
  To: Dafna Hirschfeld
  Cc: devicetree, Nick Dyer, Dmitry Torokhov, Mark Rutland,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches, Linux Input,
	linux-kernel, Enric Balletbo i Serra, Helen Koike,
	Ezequiel Garcia, Collabora Kernel ML, dafna3

On Wed, Mar 11, 2020 at 10:23 AM Dafna Hirschfeld
<dafna.hirschfeld@collabora.com> wrote:
>
> Hi,
> Thanks for the review
>
> On 10.03.20 22:14, Rob Herring wrote:
> > On Tue, Mar 03, 2020 at 07:25:33PM +0200, Dafna Hirschfeld wrote:
> >> Convert the binding file atmel,maxtouch.txt to yaml format.
> >> Also change the file name in the MAINTAINERS file.
> >>
> >> This was tested and verified on ARM and ARM64 with:
> >>
> >> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> >> make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> >>
> >> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> >> ---
> >>   .../bindings/input/atmel,maxtouch.txt         | 41 ------------
> >>   .../bindings/input/atmel,maxtouch.yaml        | 64 +++++++++++++++++++
> >>   MAINTAINERS                                   |  2 +-
> >>   3 files changed, 65 insertions(+), 42 deletions(-)
> >>   delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> >>   create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> >> deleted file mode 100644
> >> index c88919480d37..000000000000
> >> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> >> +++ /dev/null
> >> @@ -1,41 +0,0 @@
> >> -Atmel maXTouch touchscreen/touchpad
> >> -
> >> -Required properties:
> >> -- compatible:
> >> -    atmel,maxtouch
> >> -
> >> -    The following compatibles have been used in various products but are
> >> -    deprecated:
> >> -    atmel,qt602240_ts
> >> -    atmel,atmel_mxt_ts
> >> -    atmel,atmel_mxt_tp
> >> -    atmel,mXT224
> >> -
> >> -- reg: The I2C address of the device
> >> -
> >> -- interrupts: The sink for the touchpad's IRQ output
> >> -    See ../interrupt-controller/interrupts.txt
> >> -
> >> -Optional properties for main touchpad device:
> >> -
> >> -- linux,gpio-keymap: When enabled, the SPT_GPIOPWN_T19 object sends messages
> >> -    on GPIO bit changes. An array of up to 8 entries can be provided
> >> -    indicating the Linux keycode mapped to each bit of the status byte,
> >> -    starting at the LSB. Linux keycodes are defined in
> >> -    <dt-bindings/input/input.h>.
> >> -
> >> -    Note: the numbering of the GPIOs and the bit they start at varies between
> >> -    maXTouch devices. You must either refer to the documentation, or
> >> -    experiment to determine which bit corresponds to which input. Use
> >> -    KEY_RESERVED for unused padding values.
> >> -
> >> -- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
> >> -
> >> -Example:
> >> -
> >> -    touch@4b {
> >> -            compatible = "atmel,maxtouch";
> >> -            reg = <0x4b>;
> >> -            interrupt-parent = <&gpio>;
> >> -            interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
> >> -    };
> >> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> >> new file mode 100644
> >> index 000000000000..024dc4ded4f3
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> >> @@ -0,0 +1,64 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Atmel maXTouch touchscreen/touchpad
> >> +
> >> +maintainers:
> >> +  - Nick Dyer <nick@shmanahar.org>
> >> +
> >> +description: |
> >> +  Atmel maXTouch touchscreen/touchpad
> >> +
> >> +properties:
> >> +  compatible:
> >> +    const: atmel,maxtouch
> >> +
> >> +  reg:
> >> +    description: The I2C address of the device
> >> +    maxItems: 1
> >> +
> >> +  interrupts:
> >> +    description: The sink for the touchpad's IRQ output
> >
> > How many? Needs 'maxItems: 1'>
> > You can drop the description.
> >
> >> +
> >> +  linux,gpio-keymap:
> >> +    description:
> >> +      When enabled, the SPT_GPIOPWN_T19 object sends messages
> >> +      on GPIO bit changes. An array of up to 8 entries can be provided
> >> +      indicating the Linux keycode mapped to each bit of the status byte,
> >> +      starting at the LSB. Linux keycodes are defined in
> >> +      <dt-bindings/input/input.h>.
> >> +      Note, the numbering of the GPIOs and the bit they start at varies between
> >> +      maXTouch devices. You must either refer to the documentation, or
> >> +      experiment to determine which bit corresponds to which input. Use
> >> +      KEY_RESERVED for unused padding values.
> >> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> >> +    maxItems: 8
> >> +
> >> +  reset-gpios:
> >> +    description: GPIO specifier for the touchscreen's reset pin (active low)
> >> +    maxItems: 1
> >> +
> >> +required:
> >> +  - compatible
> >> +  - reg
> >> +  - interrupts
> >> +
> >> +additionalProperties: true
> >
> > That's the default and we generally want this to be 'false'.
> but many nodes has more properties not described here so I could not
> set it to false.

Like touchscreen-* properties? Then you should reference
touchscreen.yaml. And add 'unevaluatedProperties: false' here. That
doesn't yet do anything, but will when the tools support the lastest
json-schema release.

Rob


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

* Re: [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml
  2020-03-11 15:48     ` Rob Herring
@ 2020-03-20 15:21       ` Dafna Hirschfeld
  0 siblings, 0 replies; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-03-20 15:21 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Nick Dyer, Dmitry Torokhov, Mark Rutland,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches, Linux Input,
	linux-kernel, Enric Balletbo i Serra, Helen Koike,
	Ezequiel Garcia, Collabora Kernel ML, dafna3



On 11.03.20 16:48, Rob Herring wrote:
> On Wed, Mar 11, 2020 at 10:23 AM Dafna Hirschfeld
> <dafna.hirschfeld@collabora.com> wrote:
>>
>> Hi,
>> Thanks for the review
>>
>> On 10.03.20 22:14, Rob Herring wrote:
>>> On Tue, Mar 03, 2020 at 07:25:33PM +0200, Dafna Hirschfeld wrote:
>>>> Convert the binding file atmel,maxtouch.txt to yaml format.
>>>> Also change the file name in the MAINTAINERS file.
>>>>
>>>> This was tested and verified on ARM and ARM64 with:
>>>>
>>>> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>>> make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>>>
>>>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>>>> ---
>>>>    .../bindings/input/atmel,maxtouch.txt         | 41 ------------
>>>>    .../bindings/input/atmel,maxtouch.yaml        | 64 +++++++++++++++++++
>>>>    MAINTAINERS                                   |  2 +-
>>>>    3 files changed, 65 insertions(+), 42 deletions(-)
>>>>    delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>>>>    create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>>>> deleted file mode 100644
>>>> index c88919480d37..000000000000
>>>> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>>>> +++ /dev/null
>>>> @@ -1,41 +0,0 @@
>>>> -Atmel maXTouch touchscreen/touchpad
>>>> -
>>>> -Required properties:
>>>> -- compatible:
>>>> -    atmel,maxtouch
>>>> -
>>>> -    The following compatibles have been used in various products but are
>>>> -    deprecated:
>>>> -    atmel,qt602240_ts
>>>> -    atmel,atmel_mxt_ts
>>>> -    atmel,atmel_mxt_tp
>>>> -    atmel,mXT224
>>>> -
>>>> -- reg: The I2C address of the device
>>>> -
>>>> -- interrupts: The sink for the touchpad's IRQ output
>>>> -    See ../interrupt-controller/interrupts.txt
>>>> -
>>>> -Optional properties for main touchpad device:
>>>> -
>>>> -- linux,gpio-keymap: When enabled, the SPT_GPIOPWN_T19 object sends messages
>>>> -    on GPIO bit changes. An array of up to 8 entries can be provided
>>>> -    indicating the Linux keycode mapped to each bit of the status byte,
>>>> -    starting at the LSB. Linux keycodes are defined in
>>>> -    <dt-bindings/input/input.h>.
>>>> -
>>>> -    Note: the numbering of the GPIOs and the bit they start at varies between
>>>> -    maXTouch devices. You must either refer to the documentation, or
>>>> -    experiment to determine which bit corresponds to which input. Use
>>>> -    KEY_RESERVED for unused padding values.
>>>> -
>>>> -- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
>>>> -
>>>> -Example:
>>>> -
>>>> -    touch@4b {
>>>> -            compatible = "atmel,maxtouch";
>>>> -            reg = <0x4b>;
>>>> -            interrupt-parent = <&gpio>;
>>>> -            interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
>>>> -    };
>>>> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>>> new file mode 100644
>>>> index 000000000000..024dc4ded4f3
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>>>> @@ -0,0 +1,64 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Atmel maXTouch touchscreen/touchpad
>>>> +
>>>> +maintainers:
>>>> +  - Nick Dyer <nick@shmanahar.org>
>>>> +
>>>> +description: |
>>>> +  Atmel maXTouch touchscreen/touchpad
>>>> +
>>>> +properties:
>>>> +  compatible:
>>>> +    const: atmel,maxtouch
>>>> +
>>>> +  reg:
>>>> +    description: The I2C address of the device
>>>> +    maxItems: 1
>>>> +
>>>> +  interrupts:
>>>> +    description: The sink for the touchpad's IRQ output
>>>
>>> How many? Needs 'maxItems: 1'>
>>> You can drop the description.
>>>
>>>> +
>>>> +  linux,gpio-keymap:
>>>> +    description:
>>>> +      When enabled, the SPT_GPIOPWN_T19 object sends messages
>>>> +      on GPIO bit changes. An array of up to 8 entries can be provided
>>>> +      indicating the Linux keycode mapped to each bit of the status byte,
>>>> +      starting at the LSB. Linux keycodes are defined in
>>>> +      <dt-bindings/input/input.h>.
>>>> +      Note, the numbering of the GPIOs and the bit they start at varies between
>>>> +      maXTouch devices. You must either refer to the documentation, or
>>>> +      experiment to determine which bit corresponds to which input. Use
>>>> +      KEY_RESERVED for unused padding values.
>>>> +    $ref: /schemas/types.yaml#/definitions/uint32-array
>>>> +    maxItems: 8
>>>> +
>>>> +  reset-gpios:
>>>> +    description: GPIO specifier for the touchscreen's reset pin (active low)
>>>> +    maxItems: 1
>>>> +
>>>> +required:
>>>> +  - compatible
>>>> +  - reg
>>>> +  - interrupts
>>>> +
>>>> +additionalProperties: true
>>>
>>> That's the default and we generally want this to be 'false'.
>> but many nodes has more properties not described here so I could not
>> set it to false.
> 
> Like touchscreen-* properties? Then you should reference
> touchscreen.yaml. And add 'unevaluatedProperties: false' here. That
> doesn't yet do anything, but will when the tools support the lastest
> json-schema release.

Hi, no it is other properties, these are the warnings:
arch/arm/boot/dts/s5pv210-goni.dt.yaml: tsp@4a: 'atmel,burst-length', 'atmel,orientation', 'atmel,threshold', 'atmel,x-line', 'atmel,x-size', 'atmel,y-line', 'atmel,y-size', 'vdd-supply' do not match any of the regexes: 'pinctrl-[0-9]+'

arch/arm/boot/dts/omap4-droid4-xt894.dt.yaml: touchscreen@4a: 'interrupt-names', 'wakeup-source' do not match any of the regexes: 'pinctrl-[0-9]+'

arch/arm/boot/dts/exynos5800-peach-pi.dt.yaml: trackpad@4b: 'wakeup-source' does not match any of the regexes: 'pinctrl-[0-9]+'

Dafna

> 
> Rob
> 

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

end of thread, other threads:[~2020-03-20 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 17:25 [PATCH] dt-bindings: input: atmel_mxt_ts: convert atmel,maxtouch.txt to yaml Dafna Hirschfeld
2020-03-10 21:14 ` Rob Herring
2020-03-11 15:23   ` Dafna Hirschfeld
2020-03-11 15:48     ` Rob Herring
2020-03-20 15:21       ` Dafna Hirschfeld

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).