Thread (12 messages) 12 messages, 4 authors, 12d ago

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

flat view

From: sashiko-bot@kernel.org
Date: 2026-09-25 21:32:25
Also in: linux-devicetree

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: incorrect compatible match unconditionally disables mode-switch-gpios
--

commit c0479420ff01b8ddcb3ee0711384a0b5753693d1
Author: David Heidelberg [off-list ref]

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

This commit adds support for the STM FTS5 touchscreen variant to the
existing st,stmfts binding. It introduces the st,stmfts5 compatible
string and a new optional mode-switch-gpios property specific to it.
quoted hunk ↗ jump to hunk
diff --git a/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml b/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml
index 6eb1ad6582d82..3de4bc5cd3f78 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml
[ ... ]
quoted hunk ↗ jump to hunk
@@ -51,6 +54,17 @@ required:
   - interrupts
   - vdd-supply
 
+allOf:
+  - $ref: touchscreen.yaml#
+  - if:
+      not:
+        properties:
+          compatible:
+            const: st,stmfts5
[Severity: Medium]
Does this scalar string match fail against the compatible array?

The dt-schema tooling evaluates the compatible property as a string array.
Inside if blocks, const: st,stmfts5 strictly compares the entire array to
a scalar string, which is always false. Because this match always fails,
the not condition evaluates to true for all nodes, meaning
mode-switch-gpios: false is unconditionally applied to every device.

Should this be written as contains: const: st,stmfts5 instead?
quoted hunk ↗ jump to hunk
+    then:
+      properties:
+        mode-switch-gpios: false
 
 unevaluatedProperties: false
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260925-stmfts5-v8-0-0fcf49e2c85f@ixit.cz?part=3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help