Convert EKTF2127 infrared touchscreen controller binding to DT schema
and add ektf2232 compatible.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
.../bindings/input/touchscreen/ektf2127.txt | 25 --------
.../input/touchscreen/elan,ektf2127.yaml | 59 +++++++++++++++++++
2 files changed, 59 insertions(+), 25 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/elan,ektf2127.yaml
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt b/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
deleted file mode 100644
index c9f2c9f578e34..0000000000000
--- a/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-* Elan eKTF2127 I2C touchscreen controller
-
-Required properties:
- - compatible : "elan,ektf2127" or "elan,ektf2132"
- - reg : I2C slave address of the chip (0x40)
- - interrupts : interrupt specification for the ektf2127 interrupt
- - power-gpios : GPIO specification for the pin connected to the
- ektf2127's wake input. This needs to be driven high
- to take ektf2127 out of its low power state
-
-For additional optional properties see: touchscreen.txt
-
-Example:
-
-i2c@00000000 {
- ektf2127: touchscreen@15 {
- compatible = "elan,ektf2127";
- reg = <0x15>;
- interrupt-parent = <&pio>;
- interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>
- power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
- touchscreen-inverted-x;
- touchscreen-swapped-x-y;
- };
-};
diff --git a/Documentation/devicetree/bindings/input/touchscreen/elan,ektf2127.yaml b/Documentation/devicetree/bindings/input/touchscreen/elan,ektf2127.yaml
new file mode 100644
index 0000000000000..66cda99a2ddd0
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/elan,ektf2127.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/elan,ektf2127.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Elan eKTF2127 I2C touchscreen controller
+
+maintainers:
+ - Siebren Vroegindeweij <siebren.vroegindeweij@hotmail.com>
+
+allOf:
+ - $ref: touchscreen.yaml#
+
+properties:
+ compatible:
+ enum:
+ - elan,ektf2127
+ - elan,ektf2132
+ - elan,ektf2232
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ power-gpios:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - power-gpios
+
+unevaluatedProperties: false
+
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@15 {
+ compatible = "elan,ektf2127";
+ reg = <0x15>;
+ interrupt-parent = <&pio>;
+ interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>;
+ power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
+ touchscreen-inverted-x;
+ touchscreen-swapped-x-y;
+ };
+ };
+...
--
2.39.2
On 02/05/2024 20:58, Andreas Kemnade wrote: > Convert EKTF2127 infrared touchscreen controller binding to DT schema > and add ektf2232 compatible. This should be two commits. > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info> > --- > .../bindings/input/touchscreen/ektf2127.txt | 25 -------- > .../input/touchscreen/elan,ektf2127.yaml | 59 +++++++++++++++++++ > 2 files changed, 59 insertions(+), 25 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/elan,ektf2127.yaml > ... > +allOf: > + - $ref: touchscreen.yaml# > + > +properties: > + compatible: > + enum: > + - elan,ektf2127 > + - elan,ektf2132 > + - elan,ektf2232 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + power-gpios: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - interrupts > + - power-gpios > + > +unevaluatedProperties: false > + > + Just one blank line. > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.