From: Oleh Kuzhylnyi <kuzhylol@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Oleh Kuzhylnyi <kuzhylol@gmail.com>,
Conor Dooley <conor.dooley@microchip.com>,
igor.opaniuk@gmail.com,
Neil Armstrong <neil.armstrong@linaro.org>,
Jeff LaBundy <jeff@labundy.com>
Subject: [PATCH v7 1/2] dt-bindings: input: touchscreen: add Hynitron CST816X
Date: Thu, 12 Sep 2024 15:28:22 +0200 [thread overview]
Message-ID: <20240912132823.123409-1-kuzhylol@gmail.com> (raw)
Add documentation for the Hynitron CST816X touchscreen bindings.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Oleh Kuzhylnyi <kuzhylol@gmail.com>
---
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,cst816s.yaml | 126 ++++++++++++++++++
1 file changed, 126 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816s.yaml
diff --git a/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816s.yaml b/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816s.yaml
new file mode 100644
index 000000000000..99ac29da7a5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816s.yaml
@@ -0,0 +1,126 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/hynitron,cst816s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hynitron CST816S Touchscreen controller
+
+description:
+ The CST816S is a touchscreen controller from Hynitron, which supports gesture
+ recognition for swipe directions, tap, and long-press actions. This binding
+ document defines the necessary properties for integrating the CST816S with
+ a Linux system.
+
+maintainers:
+ - Oleh Kuzhylnyi <kuzhylol@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - hynitron,cst816s
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+ description:
+ Optional GPIO line used to reset the touchscreen controller.
+ optional: true
+
+ gestures:
+ type: object
+ description:
+ A list of gestures supported by the CST816S touchscreen controller and
+ their associated Linux input event codes.
+ optional: true
+
+ properties:
+ "^.*$":
+ type: object
+ description:
+ Each child node represents a gesture that the touchscreen controller
+ can recognize.
+
+ properties:
+ cst816x,gesture:
+ description:
+ Numeric value representing the gesture ID recognized by the
+ CST816S touchscreen controller.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ linux,code:
+ description:
+ Linux input event code (from linux/input-event-codes.h) that
+ corresponds to the gesture.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ required:
+ - cst816x,gesture
+ - linux,code
+
+ additionalProperties: false
+
+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>;
+
+ gestures {
+ swipe_up {
+ cst816x,gesture = <0x1>;
+ linux,code = <BTN_FORWARD>;
+ };
+
+ swipe_down {
+ cst816x,gesture = <0x2>;
+ linux,code = <BTN_BACK>;
+ };
+
+ swipe_left {
+ cst816x,gesture = <0x3>;
+ linux,code = <BTN_LEFT>;
+ };
+
+ swipe_right {
+ cst816x,gesture = <0x4>;
+ linux,code = <BTN_RIGHT>;
+ };
+
+ single_tap {
+ cst816x,gesture = <0x5>;
+ linux,code = <BTN_TOUCH>;
+ };
+
+ long_press {
+ cst816x,gesture = <0xC>;
+ linux,code = <BTN_TOOL_TRIPLETAP>;
+ };
+ };
+ };
+ };
+
+...
--
2.34.1
next reply other threads:[~2024-09-12 13:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 13:28 Oleh Kuzhylnyi [this message]
2024-09-12 13:28 ` [PATCH v7 2/2] input: add driver for Hynitron CST816X touchscreen Oleh Kuzhylnyi
2024-09-14 10:59 ` kernel test robot
2024-09-12 14:16 ` [PATCH v7 1/2] dt-bindings: input: touchscreen: add Hynitron CST816X Rob Herring (Arm)
2024-09-12 17:29 ` Conor Dooley
2024-09-15 16:14 ` Krzysztof Kozlowski
2024-09-17 1:39 ` Jeff LaBundy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240912132823.123409-1-kuzhylol@gmail.com \
--to=kuzhylol@gmail.com \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=igor.opaniuk@gmail.com \
--cc=jeff@labundy.com \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.