Debian Codegraph @

Documentation/devicetree/bindings/input/ti,tca8418.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,tca8418.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: TI TCA8418 I2C/SMBus keypad scanner
8
9 maintainers:
10 - Frank Li <[email protected]>
11
12 properties:
13 compatible:
14 enum:
15 - ti,tca8418
16
17 reg:
18 maxItems: 1
19
20 interrupts:
21 maxItems: 1
22
23 required:
24 - compatible
25 - reg
26 - interrupts
27
28 allOf:
29 - $ref: matrix-keymap.yaml#
30
31 unevaluatedProperties: false
32
33 examples:
34 - |
35 #include <dt-bindings/input/input.h>
36 #include <dt-bindings/interrupt-controller/irq.h>
37
38 i2c {
39 #address-cells = <1>;
40 #size-cells = <0>;
41
42 keypad@34 {
43 compatible = "ti,tca8418";
44 reg = <0x34>;
45 interrupt-parent = <&gpio5>;
46 interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
47 keypad,num-rows = <4>;
48 keypad,num-columns = <4>;
49 linux,keymap = < MATRIX_KEY(0x00, 0x01, BTN_0)
50 MATRIX_KEY(0x00, 0x00, BTN_1)
51 MATRIX_KEY(0x01, 0x01, BTN_2)
52 MATRIX_KEY(0x01, 0x00, BTN_3)
53 MATRIX_KEY(0x02, 0x00, BTN_4)
54 MATRIX_KEY(0x00, 0x03, BTN_5)
55 MATRIX_KEY(0x00, 0x02, BTN_6)
56 MATRIX_KEY(0x01, 0x03, BTN_7)
57 MATRIX_KEY(0x01, 0x02, BTN_8)
58 MATRIX_KEY(0x02, 0x02, BTN_9)
59 >;
60 };
61 };