blob: b5ca4b2c08ecad2fad00c33d48b62466737966b0 [file] [log] [blame]
Phil Blundell78a56aa2007-01-18 00:44:09 -05001#ifndef _GPIO_KEYS_H
2#define _GPIO_KEYS_H
3
4struct gpio_keys_button {
5 /* Configuration parameters */
Alexander Stein92a47672011-04-11 23:34:37 -07006 unsigned int code; /* input event code (KEY_*, SW_*) */
Phil Blundell78a56aa2007-01-18 00:44:09 -05007 int gpio;
8 int active_low;
Alexander Stein92a47672011-04-11 23:34:37 -07009 const char *desc;
10 unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */
Anti Sulline15b0212007-09-26 00:01:17 -040011 int wakeup; /* configure the button as a wake-up source */
Dmitry Baryshkova33466e2008-05-07 16:30:15 -040012 int debounce_interval; /* debounce ticks interval in msecs */
Mika Westerberg9e3af042010-02-04 00:48:00 -080013 bool can_disable;
Alexander Stein92a47672011-04-11 23:34:37 -070014 int value; /* axis value for EV_ABS */
Phil Blundell78a56aa2007-01-18 00:44:09 -050015};
16
17struct gpio_keys_platform_data {
18 struct gpio_keys_button *buttons;
19 int nbuttons;
Gabor Juhos0e7d0c82010-12-06 17:14:47 -080020 unsigned int poll_interval; /* polling interval in msecs -
21 for polling driver only */
Dominic Curranb67b4b12008-10-27 22:30:53 -040022 unsigned int rep:1; /* enable input subsystem auto repeat */
Shubhrajyoti D173bdd72010-08-03 19:44:40 -070023 int (*enable)(struct device *dev);
24 void (*disable)(struct device *dev);
Alexander Stein46711272011-04-11 23:34:48 -070025 const char *name; /* input device name */
Phil Blundell78a56aa2007-01-18 00:44:09 -050026};
27
28#endif