Merge branch 'xpad' into next
[deliverable/linux.git] / Documentation / devicetree / bindings / input / gpio-keys.txt
CommitLineData
fd05d089
DJ
1Device-Tree bindings for input/gpio_keys.c keyboard driver
2
3Required properties:
4 - compatible = "gpio-keys";
5
6Optional properties:
7 - autorepeat: Boolean, Enable auto repeat feature of Linux input
8 subsystem.
9
10Each button (key) is represented as a sub-node of "gpio-keys":
11Subnode properties:
12
97d86e07
DT
13 - gpios: OF device-tree gpio specification.
14 - interrupts: the interrupt line for that input.
fd05d089
DJ
15 - label: Descriptive name of the key.
16 - linux,code: Keycode to emit.
17
97d86e07
DT
18Note that either "interrupts" or "gpios" properties can be omitted, but not
19both at the same time. Specifying both properties is allowed.
f2d347ff 20
fd05d089
DJ
21Optional subnode-properties:
22 - linux,input-type: Specify event type this button/key generates.
23 If not specified defaults to <1> == EV_KEY.
24 - debounce-interval: Debouncing interval time in milliseconds.
25 If not specified defaults to 5.
99b4ffbd 26 - wakeup-source: Boolean, button can wake-up the system.
71a0151c 27 (Legacy property supported: "gpio-key,wakeup")
97d86e07
DT
28 - linux,can-disable: Boolean, indicates that button is connected
29 to dedicated (not shared) interrupt which can be disabled to
30 suppress events from the button.
fd05d089
DJ
31
32Example nodes:
33
34 gpio_keys {
35 compatible = "gpio-keys";
36 #address-cells = <1>;
37 #size-cells = <0>;
38 autorepeat;
39 button@21 {
40 label = "GPIO Key UP";
41 linux,code = <103>;
42 gpios = <&gpio1 0 1>;
43 };
f2d347ff
AS
44 button@22 {
45 label = "GPIO Key DOWN";
46 linux,code = <108>;
47 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
48 };
fd05d089 49 ...
This page took 0.062743 seconds and 5 git commands to generate.