blob: a4a38fcf2ed61d1fa3db42e053fb8259f2ffcc71 [file] [log] [blame]
David Janderfd05d082011-07-09 12:41:46 -07001Device-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
David Janderfd05d082011-07-09 12:41:46 -070013 - label: Descriptive name of the key.
14 - linux,code: Keycode to emit.
15
Alexander Steinf2d347f2014-11-25 11:53:45 -080016Required mutual exclusive subnode-properties:
17 - gpios: OF device-tree gpio specification.
18 - interrupts: the interrupt line for that input
19
David Janderfd05d082011-07-09 12:41:46 -070020Optional subnode-properties:
21 - linux,input-type: Specify event type this button/key generates.
22 If not specified defaults to <1> == EV_KEY.
23 - debounce-interval: Debouncing interval time in milliseconds.
24 If not specified defaults to 5.
25 - gpio-key,wakeup: Boolean, button can wake-up the system.
26
27Example nodes:
28
29 gpio_keys {
30 compatible = "gpio-keys";
31 #address-cells = <1>;
32 #size-cells = <0>;
33 autorepeat;
34 button@21 {
35 label = "GPIO Key UP";
36 linux,code = <103>;
37 gpios = <&gpio1 0 1>;
38 };
Alexander Steinf2d347f2014-11-25 11:53:45 -080039 button@22 {
40 label = "GPIO Key DOWN";
41 linux,code = <108>;
42 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
43 };
David Janderfd05d082011-07-09 12:41:46 -070044 ...