2007-01-17 22:44:09 -07:00
|
|
|
#ifndef _GPIO_KEYS_H
|
|
|
|
#define _GPIO_KEYS_H
|
|
|
|
|
|
|
|
struct gpio_keys_button {
|
|
|
|
/* Configuration parameters */
|
2007-04-30 22:39:13 -06:00
|
|
|
int code; /* input event code (KEY_*, SW_*) */
|
2007-01-17 22:44:09 -07:00
|
|
|
int gpio;
|
|
|
|
int active_low;
|
|
|
|
char *desc;
|
2007-04-30 22:39:13 -06:00
|
|
|
int type; /* input event type (EV_KEY, EV_SW) */
|
2007-09-25 22:01:17 -06:00
|
|
|
int wakeup; /* configure the button as a wake-up source */
|
2008-05-07 14:30:15 -06:00
|
|
|
int debounce_interval; /* debounce ticks interval in msecs */
|
2010-02-04 01:48:00 -07:00
|
|
|
bool can_disable;
|
2007-01-17 22:44:09 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct gpio_keys_platform_data {
|
|
|
|
struct gpio_keys_button *buttons;
|
|
|
|
int nbuttons;
|
2008-10-27 20:30:53 -06:00
|
|
|
unsigned int rep:1; /* enable input subsystem auto repeat */
|
2010-08-03 20:44:40 -06:00
|
|
|
int (*enable)(struct device *dev);
|
|
|
|
void (*disable)(struct device *dev);
|
2007-01-17 22:44:09 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|