aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio_keys.h
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-12-06 20:14:47 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-12-06 20:15:15 -0500
commit0e7d0c860a0dee49dacb7bbb248d1eba637075ad (patch)
tree5b96db3517840fcb8b39c64dce3254124bf59739 /include/linux/gpio_keys.h
parent8ed9e0e1b602a0bcdc3bef52ec05fdab5b484341 (diff)
Input: add input driver for polled GPIO buttons
The existing gpio-keys driver can be usable only for GPIO lines with interrupt support. Several devices have buttons connected to a GPIO line which is not capable to generate interrupts. This patch adds a new input driver using the generic GPIO layer and the input-polldev to support such buttons. [Ben Gardiner <bengardiner@nanometrics.ca: fold code to use more of the original gpio_keys infrastructure; cleanups and other improvements.] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/gpio_keys.h')
-rw-r--r--include/linux/gpio_keys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h
index ce73a30113b4..dd1a56fbe924 100644
--- a/include/linux/gpio_keys.h
+++ b/include/linux/gpio_keys.h
@@ -16,6 +16,8 @@ struct gpio_keys_button {
16struct gpio_keys_platform_data { 16struct gpio_keys_platform_data {
17 struct gpio_keys_button *buttons; 17 struct gpio_keys_button *buttons;
18 int nbuttons; 18 int nbuttons;
19 unsigned int poll_interval; /* polling interval in msecs -
20 for polling driver only */
19 unsigned int rep:1; /* enable input subsystem auto repeat */ 21 unsigned int rep:1; /* enable input subsystem auto repeat */
20 int (*enable)(struct device *dev); 22 int (*enable)(struct device *dev);
21 void (*disable)(struct device *dev); 23 void (*disable)(struct device *dev);