Re: [PATCH v5 1/3] dt-bindings: input: touchscreen: st,stmfts: Introduce STM FTS5

[email protected] Mon, 10 Aug 2026 15:30:40 +0000
Newsgroups org.kernel.vger.linux-input,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Schema validation logic incorrectly disables the `mode-switch-gpios` property for all compatible strings due to a missing `contains:` keyword.
--

--- Patch [1]: [PATCH v5 1/3] dt-bindings: input: touchscreen: st,stmfts: Introduce STM FTS5 ---
commit 38a7826302d5c029e7cdf3f5bbdf93b5ab26d21e
Author: David Heidelberg <[email protected]>

dt-bindings: input: touchscreen: st,stmfts: Introduce STM FTS5

This commit introduces support for the more recent STM FTS5 touchscreen in
the device tree bindings. It adds the new compatible string and an optional
mode-switch-gpios property for the FTS5 variant.

> diff --git a/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml b/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml
> index 64c4f24ea3dd0..3de4bc5cd3f78 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml

[ ... ]

> @@ -51,6 +54,17 @@ required:
>    - interrupts
>    - vdd-supply
>  
> +allOf:
> +  - $ref: touchscreen.yaml#
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            const: st,stmfts5

[Severity: Low]
Does this conditional logic work as intended for a string array?

Since the compatible property evaluates as a JSON array of strings in
dt-schema, comparing it directly using const: st,stmfts5 will always
evaluate to false. 

Because this is wrapped in a not: block, the overall condition becomes true
for all nodes, meaning mode-switch-gpios: false is applied unconditionally
even for the st,stmfts5 compatible.

Should this use contains: const: st,stmfts5 instead so that valid device
trees using this property are not erroneously rejected during schema checks?

> +    then:
> +      properties:
> +        mode-switch-gpios: false
> +
>  unevaluatedProperties: false

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1