diff mbox series

[5/6] dt-bindings: input: zinitix: Document touch-keys support

Message ID 20211027181350.91630-6-nikita@trvn.ru (mailing list archive)
State Superseded
Headers show
Series Add touch-keys support to the Zinitix touch driver | expand

Commit Message

Nikita Travkin Oct. 27, 2021, 6:13 p.m. UTC
In some configrations the touch controller can support the touch-keys.
Doucument the linux,keycodes property that enables those keys and
specifies the keycodes that should be used to report the key events.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 .../bindings/input/touchscreen/zinitix,bt400.yaml         | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Luca Weiss Oct. 27, 2021, 6:33 p.m. UTC | #1
Hi Nikita,

On Mittwoch, 27. Oktober 2021 20:13:49 CEST Nikita Travkin wrote:
> In some configrations the touch controller can support the touch-keys.
> Doucument the linux,keycodes property that enables those keys and
> specifies the keycodes that should be used to report the key events.
> 
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
>  .../bindings/input/touchscreen/zinitix,bt400.yaml         | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git
> a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
> b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
> index b4e5ba7c0b49..40b243c07fd4 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
> +++
> b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml @@
> -79,6 +79,14 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      enum: [1, 2]
> 
> +  linux,keycodes:
> +    description: |
> +      This property specifies an array of keycodes assigned to the
> +      touch-keys that can be present in some touchscreen configurations.
> +    $ref: /schemas/input/input.yaml#/properties/linux,keycodes
> +    minItems: 1

I think this would suggest all devices using the driver must have at least 
keycode declared which doesn't seem to be the desired behavior?

Regards,
Luca

> +    maxItems: 8
> +
>    touchscreen-size-x: true
>    touchscreen-size-y: true
>    touchscreen-fuzz-x: true
Nikita Travkin Oct. 27, 2021, 6:54 p.m. UTC | #2
Hi Luca,

Luca Weiss писал(а) 27.10.2021 23:33:
> Hi Nikita,
> 
> On Mittwoch, 27. Oktober 2021 20:13:49 CEST Nikita Travkin wrote:
>> In some configrations the touch controller can support the touch-keys.
>> Doucument the linux,keycodes property that enables those keys and
>> specifies the keycodes that should be used to report the key events.
>> 
>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>> ---
>>  .../bindings/input/touchscreen/zinitix,bt400.yaml         | 8 
>> ++++++++
>>  1 file changed, 8 insertions(+)
>> 
>> diff --git
>> a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
>> b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
>> index b4e5ba7c0b49..40b243c07fd4 100644
>> --- 
>> a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
>> +++
>> b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml 
>> @@
>> -79,6 +79,14 @@ properties:
>>      $ref: /schemas/types.yaml#/definitions/uint32
>>      enum: [1, 2]
>> 
>> +  linux,keycodes:
>> +    description: |
>> +      This property specifies an array of keycodes assigned to the
>> +      touch-keys that can be present in some touchscreen 
>> configurations.
>> +    $ref: /schemas/input/input.yaml#/properties/linux,keycodes
>> +    minItems: 1
> 
> I think this would suggest all devices using the driver must have at 
> least
> keycode declared which doesn't seem to be the desired behavior?

As I haven't added the property to the "required" list I'd read this as
"If the property is defined it must contain from one to eight elements"
so I think that *technically* the schema is correct. (Otherwise the
dt_schema_check would fail verifying the example) However this indeed
may be true that I could give a better description than "can be present
in some touchscreen configurations."

Thanks,
Nikita

> Regards,
> Luca
> 
>> +    maxItems: 8
>> +
>>    touchscreen-size-x: true
>>    touchscreen-size-y: true
>>    touchscreen-fuzz-x: true
Rob Herring Nov. 1, 2021, 9:41 p.m. UTC | #3
On Wed, Oct 27, 2021 at 11:13:49PM +0500, Nikita Travkin wrote:
> In some configrations the touch controller can support the touch-keys.
> Doucument the linux,keycodes property that enables those keys and
> specifies the keycodes that should be used to report the key events.
> 
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
>  .../bindings/input/touchscreen/zinitix,bt400.yaml         | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
> index b4e5ba7c0b49..40b243c07fd4 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
> @@ -79,6 +79,14 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      enum: [1, 2]
>  
> +  linux,keycodes:
> +    description: |
> +      This property specifies an array of keycodes assigned to the
> +      touch-keys that can be present in some touchscreen configurations.
> +    $ref: /schemas/input/input.yaml#/properties/linux,keycodes

Instead, reference input.yaml at the top-level.

> +    minItems: 1
> +    maxItems: 8
> +
>    touchscreen-size-x: true
>    touchscreen-size-y: true
>    touchscreen-fuzz-x: true
> -- 
> 2.30.2
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
index b4e5ba7c0b49..40b243c07fd4 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml
@@ -79,6 +79,14 @@  properties:
     $ref: /schemas/types.yaml#/definitions/uint32
     enum: [1, 2]
 
+  linux,keycodes:
+    description: |
+      This property specifies an array of keycodes assigned to the
+      touch-keys that can be present in some touchscreen configurations.
+    $ref: /schemas/input/input.yaml#/properties/linux,keycodes
+    minItems: 1
+    maxItems: 8
+
   touchscreen-size-x: true
   touchscreen-size-y: true
   touchscreen-fuzz-x: true