2024-01-20 21:17:44

by Duje Mihanović

[permalink] [raw]
Subject: [PATCH v2 2/3] dt-bindings: input: imagis: Document touch keys

IST3032C (and possibly some other models) has touch keys. Document this.

Signed-off-by: Duje Mihanović <[email protected]>
---
.../bindings/input/touchscreen/imagis,ist3038c.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
index 2af71cbcc97d..960e5436642f 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
@@ -42,6 +42,17 @@ properties:
touchscreen-inverted-y: true
touchscreen-swapped-x-y: true

+if:
+ properties:
+ compatible:
+ contains:
+ const: imagis,ist3032c
+then:
+ properties:
+ linux,keycodes:
+ description: Keycodes for the touch keys
+ maxItems: 2
+
additionalProperties: false

required:

--
2.43.0




2024-01-22 10:28:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: input: imagis: Document touch keys

On 20/01/2024 22:16, Duje Mihanović wrote:
> IST3032C (and possibly some other models) has touch keys. Document this.
>
> Signed-off-by: Duje Mihanović <[email protected]>
> ---

Please provide changelog describing what changed against v1. Cover
letter has something but it is not accurate. It says nothing about this
patch.


> .../bindings/input/touchscreen/imagis,ist3038c.yaml | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> index 2af71cbcc97d..960e5436642f 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> @@ -42,6 +42,17 @@ properties:
> touchscreen-inverted-y: true
> touchscreen-swapped-x-y: true
>
> +if:

Move allOf here and keep it under allOf.

> + properties:
> + compatible:
> + contains:
> + const: imagis,ist3032c
> +then:
> + properties:
> + linux,keycodes:

No, this property is not allowed by your binding. I doubt this was
really tested.

Anyway, even if it works, it's not what we expect. Where is the property
defined?

Best regards,
Krzysztof


2024-01-22 18:15:12

by Duje Mihanović

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: input: imagis: Document touch keys

On Monday, January 22, 2024 11:27:09 AM CET Krzysztof Kozlowski wrote:
> On 20/01/2024 22:16, Duje Mihanović wrote:
> > diff --git
> > a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> > b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> > index 2af71cbcc97d..960e5436642f 100644
> > ---
> > a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> > +++
> > b/Documentation/devicetree/bindings/input/touchscreen/
imagis,ist3038c.yaml>
> > @@ -42,6 +42,17 @@ properties:
> > touchscreen-inverted-y: true
> > touchscreen-swapped-x-y: true
> >
> > +if:
> Move allOf here and keep it under allOf.
>
> > + properties:
> > + compatible:
> > + contains:
> > + const: imagis,ist3032c
> > +then:
> > + properties:
>
> > + linux,keycodes:
> No, this property is not allowed by your binding. I doubt this was
> really tested.
>
> Anyway, even if it works, it's not what we expect. Where is the property
> defined?

I was under the impression that it can be defined inside the if statement
since "make dt_binding_check" ran without any errors. If that's wrong, I'm not
sure how else to make the property valid only for ist3032c (the two devices
using ist3038c, samsung-j5 and j5x seem to have tm2-touchkey instead).

Regards,
--
Duje