diff mbox series

[v2,1/5] dt-bindings: input: touchscreen: add bindings for focaltech,fts5452

Message ID 20230410160200.57261-2-joelselvaraj.oss@gmail.com
State New
Headers show
Series Add support for Focaltech FTS Touchscreen | expand

Commit Message

Joel Selvaraj April 10, 2023, 4:01 p.m. UTC
Add devicetree bindings for the Focaltech FTS touchscreen drivers.

Signed-off-by: Joel Selvaraj <joelselvaraj.oss@gmail.com>
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
---
 .../input/touchscreen/focaltech,fts5452.yaml  | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/focaltech,fts5452.yaml

Comments

Krzysztof Kozlowski April 14, 2023, 7:44 a.m. UTC | #1
On 14/04/2023 02:32, Joel Selvaraj wrote:
> Hi Krzysztof Kozlowski,
> 
> Konrad Dybcio suggested to use interrupts-extended instead interrupts.

Sorry,

I have no idea what this email is about.

There is no context here, no reply, it just appeared alone in my inbox
without any reference. Please respond inline to existing messages,
keeping necessary context you are replying to.

> So in my WIP v3, I have updated it in the dts and bindings example.
> However, I am confused if I should replace the "interrupts" with
> "interrupts-extended" property in the schema too? I see a lot of schemas

No.

> specifying "interrupts", with examples using "interrupts" or
> "interrupts-extended". At the same time, I see some specifying both
> "interrupts" and "interrupts-extended" (like one of these two) and very
> few others specify only "interrupts-extended" in the schema. Which is
> the currently recommended way to do this?
> 
> In between, the interrupt property should be a required property as the
> driver will not function without an interrupt. I will fix that in v3.
> 
> Thanks,
> Joel Selvaraj

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/focaltech,fts5452.yaml b/Documentation/devicetree/bindings/input/touchscreen/focaltech,fts5452.yaml
new file mode 100644
index 000000000000..f42868293439
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/focaltech,fts5452.yaml
@@ -0,0 +1,71 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/focaltech,fts5452.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Focaltech FTS I2C Touchscreen Controller
+
+maintainers:
+  - Joel Selvaraj <joelselvaraj.oss@gmail.com>
+  - Caleb Connolly <caleb@connolly.tech>
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    enum:
+      - focaltech,fts5452
+      - focaltech,fts8719
+
+  reg:
+    const: 0x38
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  avdd-supply:
+    description: regulator supplying analog power (2.6V to 3.3V).
+
+  vddio-supply:
+    description: regulator supplying IO power (1.8V).
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - touchscreen-size-x
+  - touchscreen-size-y
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      touchscreen@38 {
+        compatible = "focaltech,fts5452";
+        reg = <0x38>;
+
+        interrupt-parent = <&tlmm>;
+        interrupts = <125 IRQ_TYPE_EDGE_FALLING>;
+        reset-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>;
+
+        avdd-supply = <&vreg_l28a_3p0>;
+        vddio-supply = <&vreg_l14a_1p88>;
+
+        pinctrl-names = "default", "suspend";
+        pinctrl-0 = <&ts_int_active &ts_reset_active>;
+        pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
+
+        touchscreen-size-x = <1080>;
+        touchscreen-size-y = <2160>;
+      };
+    };