2007-01-18 06:44:09 +01:00
|
|
|
#ifndef _GPIO_KEYS_H
|
|
|
|
#define _GPIO_KEYS_H
|
|
|
|
|
2012-02-01 18:12:24 +01:00
|
|
|
struct device;
|
|
|
|
|
2007-01-18 06:44:09 +01:00
|
|
|
struct gpio_keys_button {
|
|
|
|
/* Configuration parameters */
|
2011-04-12 08:34:37 +02:00
|
|
|
unsigned int code; /* input event code (KEY_*, SW_*) */
|
2012-03-20 01:54:31 +01:00
|
|
|
int gpio; /* -1 if this key does not support gpio */
|
2007-01-18 06:44:09 +01:00
|
|
|
int active_low;
|
2011-04-12 08:34:37 +02:00
|
|
|
const char *desc;
|
|
|
|
unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */
|
2007-09-26 06:01:17 +02:00
|
|
|
int wakeup; /* configure the button as a wake-up source */
|
2008-05-07 22:30:15 +02:00
|
|
|
int debounce_interval; /* debounce ticks interval in msecs */
|
2010-02-04 09:48:00 +01:00
|
|
|
bool can_disable;
|
2011-04-12 08:34:37 +02:00
|
|
|
int value; /* axis value for EV_ABS */
|
2012-03-20 01:54:31 +01:00
|
|
|
unsigned int irq; /* Irq number in case of interrupt keys */
|
2007-01-18 06:44:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct gpio_keys_platform_data {
|
|
|
|
struct gpio_keys_button *buttons;
|
|
|
|
int nbuttons;
|
2010-12-07 02:14:47 +01:00
|
|
|
unsigned int poll_interval; /* polling interval in msecs -
|
|
|
|
for polling driver only */
|
2008-10-28 03:30:53 +01:00
|
|
|
unsigned int rep:1; /* enable input subsystem auto repeat */
|
2010-08-04 04:44:40 +02:00
|
|
|
int (*enable)(struct device *dev);
|
|
|
|
void (*disable)(struct device *dev);
|
2011-04-12 08:34:48 +02:00
|
|
|
const char *name; /* input device name */
|
2007-01-18 06:44:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|