Commit | Line | Data |
---|---|---|
af6a5af8 HG |
1 | Allwinner sun4i low res adc attached tablet keys |
2 | ------------------------------------------------ | |
3 | ||
4 | Required properties: | |
5 | - compatible: "allwinner,sun4i-a10-lradc-keys" | |
6 | - reg: mmio address range of the chip | |
7 | - interrupts: interrupt to which the chip is connected | |
8 | - vref-supply: powersupply for the lradc reference voltage | |
9 | ||
10 | Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys": | |
11 | ||
12 | Required subnode-properties: | |
13 | - label: Descriptive name of the key. | |
14 | - linux,code: Keycode to emit. | |
fd18ab89 | 15 | - channel: Channel this key is attached to, must be 0 or 1. |
af6a5af8 HG |
16 | - voltage: Voltage in µV at lradc input when this key is pressed. |
17 | ||
18 | Example: | |
19 | ||
20 | #include <dt-bindings/input/input.h> | |
21 | ||
22 | lradc: lradc@01c22800 { | |
23 | compatible = "allwinner,sun4i-a10-lradc-keys"; | |
24 | reg = <0x01c22800 0x100>; | |
25 | interrupts = <31>; | |
26 | vref-supply = <®_vcc3v0>; | |
27 | ||
28 | button@191 { | |
29 | label = "Volume Up"; | |
30 | linux,code = <KEY_VOLUMEUP>; | |
31 | channel = <0>; | |
32 | voltage = <191274>; | |
33 | }; | |
34 | ||
35 | button@392 { | |
36 | label = "Volume Down"; | |
37 | linux,code = <KEY_VOLUMEDOWN>; | |
38 | channel = <0>; | |
39 | voltage = <392644>; | |
40 | }; | |
41 | ||
42 | button@601 { | |
43 | label = "Menu"; | |
44 | linux,code = <KEY_MENU>; | |
45 | channel = <0>; | |
46 | voltage = <601151>; | |
47 | }; | |
48 | ||
49 | button@795 { | |
50 | label = "Enter"; | |
51 | linux,code = <KEY_ENTER>; | |
52 | channel = <0>; | |
53 | voltage = <795090>; | |
54 | }; | |
55 | ||
56 | button@987 { | |
57 | label = "Home"; | |
58 | linux,code = <KEY_HOMEPAGE>; | |
59 | channel = <0>; | |
60 | voltage = <987387>; | |
61 | }; | |
62 | }; |