]> git.dujemihanovic.xyz Git - linux.git/commitdiff
dt-bindings: input: touchscreen: st,stmfts: convert to dtschema
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 4 Feb 2023 00:59:58 +0000 (16:59 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 4 Feb 2023 01:00:39 +0000 (17:00 -0800)
Convert the ST-Microelectronics FingerTip touchscreen controller
bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230127202040.196411-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/touchscreen/st,stmfts.txt [deleted file]
Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.txt b/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.txt
deleted file mode 100644 (file)
index 0a5d0cb..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-* ST-Microelectronics FingerTip touchscreen controller
-
-The ST-Microelectronics FingerTip device provides a basic touchscreen
-functionality. Along with it the user can enable the touchkey which can work as
-a basic HOME and BACK key for phones.
-
-The driver supports also hovering as an absolute single touch event with x, y, z
-coordinates.
-
-Required properties:
-- compatible           : must be "st,stmfts"
-- reg                  : I2C slave address, (e.g. 0x49)
-- interrupts           : interrupt specification
-- avdd-supply          : analogic power supply
-- vdd-supply           : power supply
-- touchscreen-size-x   : see touchscreen.txt
-- touchscreen-size-y   : see touchscreen.txt
-
-Optional properties:
-- touch-key-connected  : specifies whether the touchkey feature is connected
-- ledvdd-supply                : power supply to the touch key leds
-
-Example:
-
-i2c@00000000 {
-
-       /* ... */
-
-       touchscreen@49 {
-               compatible = "st,stmfts";
-               reg = <0x49>;
-               interrupt-parent = <&gpa1>;
-               interrupts = <1 IRQ_TYPE_NONE>;
-               touchscreen-size-x = <1599>;
-               touchscreen-size-y = <2559>;
-               touch-key-connected;
-               avdd-supply = <&ldo30_reg>;
-               vdd-supply = <&ldo31_reg>;
-               ledvdd-supply = <&ldo33_reg>;
-       };
-};
diff --git a/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml b/Documentation/devicetree/bindings/input/touchscreen/st,stmfts.yaml
new file mode 100644 (file)
index 0000000..c593ae6
--- /dev/null
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/st,stmfts.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST-Microelectronics FingerTip touchscreen controller
+
+maintainers:
+  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+description:
+  The ST-Microelectronics FingerTip device provides a basic touchscreen
+  functionality. Along with it the user can enable the touchkey which can work
+  as a basic HOME and BACK key for phones.
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    const: st,stmfts
+
+  reg:
+    maxItems: 1
+
+  avdd-supply:
+    description: Analogic power supply
+
+  interrupts:
+    maxItems: 1
+
+  ledvdd-supply:
+    description: Power supply to the touch key leds
+
+  touch-key-connected:
+    type: boolean
+    description: The touchkey feature is connected
+
+  vdd-supply:
+    description: Power supply
+
+required:
+  - compatible
+  - reg
+  - avdd-supply
+  - interrupts
+  - vdd-supply
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        touchscreen@49 {
+            compatible = "st,stmfts";
+            reg = <0x49>;
+            interrupt-parent = <&gpa1>;
+            interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+            touchscreen-size-x = <1599>;
+            touchscreen-size-y = <2559>;
+            touch-key-connected;
+            avdd-supply = <&ldo30_reg>;
+            vdd-supply = <&ldo31_reg>;
+            ledvdd-supply = <&ldo33_reg>;
+        };
+    };