lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241022063158.5910-2-mjchen0829@gmail.com>
Date: Tue, 22 Oct 2024 06:31:57 +0000
From: mjchen <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,
	mjchen@...oton.com,
	peng.fan@....com,
	sudeep.holla@....com,
	arnd@...db.de,
	conor+dt@...nel.org,
	krzk+dt@...nel.org,
	robh@...nel.org,
	dmitry.torokhov@...il.com
Subject: [PATCH 1/2] dt-bindings: input: Add Nuvoton MA35D1 keypad

From: mjchen <mjchen@...oton.com>

Add YAML bindings for MA35D1 SoC keypad.

Signed-off-by: mjchen <mjchen@...oton.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@...il.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@...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-period = <1>;
+     per-scale = <1>;
+     per-scalediv = <24>;
+    };
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ