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