Input: gpio_keys - consolidate key destructor code
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / gpio_keys.h
CommitLineData
78a56aab
PB
1#ifndef _GPIO_KEYS_H
2#define _GPIO_KEYS_H
3
b18db3d9
HS
4struct device;
5
78a56aab
PB
6struct gpio_keys_button {
7 /* Configuration parameters */
92a47674 8 unsigned int code; /* input event code (KEY_*, SW_*) */
78a56aab
PB
9 int gpio;
10 int active_low;
92a47674
AS
11 const char *desc;
12 unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */
e15b0213 13 int wakeup; /* configure the button as a wake-up source */
a33466e3 14 int debounce_interval; /* debounce ticks interval in msecs */
9e3af04f 15 bool can_disable;
92a47674 16 int value; /* axis value for EV_ABS */
78a56aab
PB
17};
18
19struct gpio_keys_platform_data {
20 struct gpio_keys_button *buttons;
21 int nbuttons;
0e7d0c86
GJ
22 unsigned int poll_interval; /* polling interval in msecs -
23 for polling driver only */
b67b4b11 24 unsigned int rep:1; /* enable input subsystem auto repeat */
173bdd74
S
25 int (*enable)(struct device *dev);
26 void (*disable)(struct device *dev);
46711277 27 const char *name; /* input device name */
78a56aab
PB
28};
29
30#endif