From: mjchen <mjchen0829@gmail.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, mjchen0829@gmail.com,
mjchen@nuvoton.com, peng.fan@nxp.com, sudeep.holla@arm.com,
arnd@arndb.de, conor+dt@kernel.org, krzk+dt@kernel.org,
robh@kernel.org, dmitry.torokhov@gmail.com
Subject: [PATCH 1/2] dt-bindings: input: Add Nuvoton MA35D1 keypad
Date: Tue, 22 Oct 2024 06:31:57 +0000 [thread overview]
Message-ID: <20241022063158.5910-2-mjchen0829@gmail.com> (raw)
In-Reply-To: <20241022063158.5910-1-mjchen0829@gmail.com>
From: mjchen <mjchen@nuvoton.com>
Add YAML bindings for MA35D1 SoC keypad.
Signed-off-by: mjchen <mjchen@nuvoton.com>
---
.../bindings/input/nvt,ma35d1-keypad.yaml | 88 +++++++++++++++++++
1 file changed, 88 insertions(+)
create mode 100755 Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml
diff --git a/Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml
new file mode 100755
index 000000000000..3d9fc26cc132
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/nvt,ma35d1-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVT MA35D1 Keypad
+
+maintainers:
+ - Ming-jen Chen <mjchen0829@gmail.com>
+
+allOf:
+ - $ref: /schemas/input/matrix-keymap.yaml#
+
+properties:
+ compatible:
+ const: nuvoton,ma35d1-kpi
+
+ debounce-period:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ key debounce period select
+ 0 = 0 clock
+ 1 = 0 clock
+ 2 = 0 clock
+ 3 = 8 clocks
+ 4 = 16 clocks
+ 5 = 32 clocks
+ 6 = 64 clocks
+ 7 = 128 clocks
+ 8 = 256 clocks
+ 9 = 512 clocks
+ 10 = 1024 clocks
+ 11 = 2048 clocks
+ 12 = 4096 clocks
+ 13 = 8192 clocks
+
+ per-scale:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Row Scan Cycle Pre-scale Value (1 to 256).
+
+ per-scalediv:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Per-scale divider (1 to 256).
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - linux,keymap
+ - debounce-period
+ - per-scale
+ - per-scalediv
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/input/input.h>
+ keypad: keypad@404A0000 {
+ 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-period = <1>;
+ per-scale = <1>;
+ per-scalediv = <24>;
+ };
--
2.17.1
next prev parent reply other threads:[~2024-10-22 6:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 6:31 [PATCH 0/2] Add support for nuvoton ma35d1 keypad controller mjchen
2024-10-22 6:31 ` mjchen [this message]
2024-10-23 8:40 ` [PATCH 1/2] dt-bindings: input: Add Nuvoton MA35D1 keypad Krzysztof Kozlowski
2024-10-25 5:36 ` Ming-Jen Chen
2024-10-25 11:42 ` Krzysztof Kozlowski
2024-10-28 1:23 ` Ming-Jen Chen
[not found] ` <984781ba-9f4c-4179-84d5-4ab8bbe4c3c6@gmail.com>
2024-10-28 7:04 ` Krzysztof Kozlowski
2024-10-29 2:00 ` Ming-Jen Chen
2024-10-29 13:19 ` Krzysztof Kozlowski
2024-10-30 1:46 ` Ming-Jen Chen
2024-10-30 6:10 ` Krzysztof Kozlowski
2024-10-23 8:53 ` Krzysztof Kozlowski
2024-10-22 6:31 ` [PATCH 2/2] input: keypad: add new keypad driver for MA35D1 mjchen
2024-10-23 8:45 ` Krzysztof Kozlowski
2024-10-28 6:23 ` Ming-Jen Chen
2024-10-23 21:20 ` Dmitry Torokhov
2024-10-29 7:06 ` Ming-Jen Chen
-- strict thread matches above, loose matches on Subject: below --
2024-11-19 2:59 [PATCH v3 0/2] Add support for nuvoton ma35d1 keypad controller Ming-Jen Chen
2024-11-19 2:59 ` [PATCH 1/2] dt-bindings: input: Add Nuvoton MA35D1 keypad Ming-Jen Chen
2024-11-20 8:41 ` Krzysztof Kozlowski
2024-12-06 3:32 ` Ming-Jen Chen
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=20241022063158.5910-2-mjchen0829@gmail.com \
--to=mjchen0829@gmail.com \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjchen@nuvoton.com \
--cc=peng.fan@nxp.com \
--cc=robh@kernel.org \
--cc=sudeep.holla@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).