[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241204021014.5083-3-mjchen0829@gmail.com>
Date: Wed, 4 Dec 2024 02:10:14 +0000
From: Ming-Jen Chen <mjchen0829@...il.com>
To: linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org,
linux-input@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
mjchen0829@...il.com,
sudeep.holla@....com,
arnd@...db.de,
peng.fan@....com,
conor+dt@...nel.org,
krzk+dt@...nel.org,
robh@...nel.org,
dmitry.torokhov@...il.com
Subject: [PATCH v4 2/2] dt-bindings: input: Add Nuvoton MA35D1 keypad
Add YAML bindings for MA35D1 SoC keypad.
Signed-off-by: Ming-Jen Chen <mjchen0829@...il.com>
---
.../bindings/input/nuvoton,ma35d1-keypad.yaml | 69 +++++++++++++++++++
1 file changed, 69 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
diff --git a/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
new file mode 100644
index 000000000000..54a81583bf2b
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/nuvoton,ma35d1-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton MA35D1 Keypad
+
+maintainers:
+ - Ming-jen Chen <mjchen0829@...il.com>
+
+allOf:
+ - $ref: /schemas/input/matrix-keymap.yaml#
+
+properties:
+ compatible:
+ const: nuvoton,ma35d1-kpi
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ debounce-delay-ms:
+ description: Debounce delay time in milliseconds.
+ maxItems: 1
+
+ scan-interval-ms:
+ description: Scan interval time in milliseconds.
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - debounce-delay-ms
+ - scan-interval-ms
+ - linux,keymap
+ - keypad,num-rows
+ - keypad,num-columns
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/input/input.h>
+ keypad@...a0000 {
+ compatible = "nuvoton,ma35d1-kpi";
+ reg = <0x404a0000 0x10000>;
+ interrupts = <79>;
+ clocks = <&clk>;
+ keypad,num-rows = <2>;
+ keypad,num-columns = <2>;
+
+ linux,keymap = <
+ MATRIX_KEY(0, 0, KEY_ENTER)
+ MATRIX_KEY(0, 1, KEY_ENTER)
+ MATRIX_KEY(1, 0, KEY_SPACE)
+ MATRIX_KEY(1, 1, KEY_Z)
+ >;
+
+ debounce-delay-ms = <1>;
+ scan-interval-ms = <20>;
+ };
--
2.25.1
Powered by blists - more mailing lists