Debian Codegraph @

Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/input/ti,twl4030-keypad.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Texas Instruments TWL4030-family Keypad Controller
8
9 maintainers:
10 - Peter Ujfalusi <[email protected]>
11
12 description:
13 TWL4030's Keypad controller is used to interface a SoC with a matrix-type
14 keypad device. The keypad controller supports multiple row and column lines.
15 A key can be placed at each intersection of a unique row and a unique column.
16 The keypad controller can sense a key-press and key-release and report the
17 event using a interrupt to the cpu.
18
19 allOf:
20 - $ref: matrix-keymap.yaml#
21
22 properties:
23 compatible:
24 const: ti,twl4030-keypad
25
26 interrupts:
27 maxItems: 1
28
29 required:
30 - compatible
31 - interrupts
32 - keypad,num-rows
33 - keypad,num-columns
34 - linux,keymap
35
36 unevaluatedProperties: false
37
38 examples:
39 - |
40 #include <dt-bindings/input/input.h>
41
42 keypad {
43 compatible = "ti,twl4030-keypad";
44 interrupts = <1>;
45 keypad,num-rows = <8>;
46 keypad,num-columns = <8>;
47 linux,keymap = <
48 /* row 0 */
49 MATRIX_KEY(0, 0, KEY_1)
50 MATRIX_KEY(0, 1, KEY_2)
51 MATRIX_KEY(0, 2, KEY_3)
52
53 /* ...and so on for a full 8x8 matrix... */
54
55 /* row 7 */
56 MATRIX_KEY(7, 6, KEY_Y)
57 MATRIX_KEY(7, 7, KEY_Z)
58 >;
59 };