[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250629162523.291887-1-kuzhylol@gmail.com>
Date: Sun, 29 Jun 2025 18:25:22 +0200
From: Oleh Kuzhylnyi <kuzhylol@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Sasha Finkelstein <fnkl.kernel@...il.com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Javier Martinez Canillas <javierm@...hat.com>,
Janne Grunau <j@...nau.net>,
Igor Opaniuk <igor.opaniuk@...il.com>,
Neal Gompa <neal@...pa.dev>,
Jeff LaBundy <jeff@...undy.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Oleh Kuzhylnyi <kuzhylol@...il.com>,
linux-input@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v8 1/2] dt-bindings: input: touchscreen: add hynitron cst816x
Add documentation for Hynitron CST816x series touchscreen bindings.
Signed-off-by: Oleh Kuzhylnyi <kuzhylol@...il.com>
---
Changes in v8:
- Use linux,keycodes to map touch gestures to key events
- Refactore binding properties based on feedback from Jeff LaBundy
and Krzysztof Kozlowski to align with official documentation
Changes in v7:
- Introduce the gestures field along with its sub-fields
- Make reset-gpio property optional
- Extend main description
- Remove "touchscreen" reference
Changes in v6:
- Fix minor tweak adviced by Krzysztof:
- Move additionalProperties field after required
Changes in v5:
- No code changes
Changes in v4:
- Add Conor's Dooley "Reviewed-by" tag
Changes in v3:
- Rename filename to hynitron,cst816s.yaml
- Update description with display details
Changes in v2:
- Apply pin definitions and DT headers
- Use generic name for DT node
- Drop status field
.../input/touchscreen/hynitron,cst816x.yaml | 82 +++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml
diff --git a/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml b/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml
new file mode 100644
index 000000000000..0d358463d7f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/hynitron,cst816x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hynitron CST816x Series Capacitive Touch controller
+
+maintainers:
+ - Oleh Kuzhylnyi <kuzhylol@...il.com>
+
+description: |
+ Bindings for CST816x high performance self-capacitance touch chip series
+ with single point gesture and real two-point operation.
+
+properties:
+ compatible:
+ enum:
+ - hynitron,cst816s
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ linux,keycodes:
+ minItems: 1
+ maxItems: 16
+ description: |
+ Specifies the numeric keycodes associated with each available gesture in
+ the following order (enter 0 for unused and reserved gestures):
+ 0: Touch
+ 1: Swipe up
+ 2: Swipe down
+ 3: Swipe left
+ 4: Swipe right
+ 5-11: Reserved
+ 12: Long press
+ 13-15: Reserved
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/linux-event-codes.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ touchscreen@15 {
+ compatible = "hynitron,cst816s";
+ reg = <0x15>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <4 IRQ_TYPE_EDGE_RISING>;
+ reset-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ linux,keycodes = <BTN_TOUCH>,
+ <KEY_UP>,
+ <KEY_DOWN>,
+ <KEY_LEFT>,
+ <KEY_RIGHT>,
+ <KEY_RESERVED>,
+ <KEY_RESERVED>,
+ <KEY_RESERVED>,
+ <KEY_RESERVED>,
+ <KEY_RESERVED>,
+ <KEY_RESERVED>,
+ <KEY_RESERVED>,
+ <BTN_TOOL_TRIPLETAP>;
+ };
+ };
+
+...
--
2.34.1
Powered by blists - more mailing lists