diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-12-06 17:14:47 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-12-06 17:15:15 -0800 |
commit | 0e7d0c860a0dee49dacb7bbb248d1eba637075ad (patch) | |
tree | 5b96db3517840fcb8b39c64dce3254124bf59739 /include/linux/gpio_keys.h | |
parent | 8ed9e0e1b602a0bcdc3bef52ec05fdab5b484341 (diff) | |
download | blackbird-op-linux-0e7d0c860a0dee49dacb7bbb248d1eba637075ad.tar.gz blackbird-op-linux-0e7d0c860a0dee49dacb7bbb248d1eba637075ad.zip |
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.h | 2 |
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 { struct gpio_keys_platform_data { struct gpio_keys_button *buttons; int nbuttons; + unsigned int poll_interval; /* polling interval in msecs - + for polling driver only */ unsigned int rep:1; /* enable input subsystem auto repeat */ int (*enable)(struct device *dev); void (*disable)(struct device *dev); |