diff options
author | Dominic Curran <dcurran@ti.com> | 2008-10-27 22:30:53 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-10-27 22:33:04 -0400 |
commit | b67b4b117746aef686e527c3205792db0f2c9e16 (patch) | |
tree | 07598e37a3c6cf63d20c76fcb74d232e1f7043aa | |
parent | b4a3ac9a3c26e82e31f8a8f55cb014bc580b1216 (diff) |
Input: gpio-keys - add flag to allow auto repeat
This patch adds a flag to gpio-key driver to turn on the input subsystems
auto repeat feature if needed.
Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 4 | ||||
-rw-r--r-- | include/linux/gpio_keys.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 05f3f43582c2..ad67d763fdbd 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -98,6 +98,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
98 | input->id.product = 0x0001; | 98 | input->id.product = 0x0001; |
99 | input->id.version = 0x0100; | 99 | input->id.version = 0x0100; |
100 | 100 | ||
101 | /* Enable auto repeat feature of Linux input subsystem */ | ||
102 | if (pdata->rep) | ||
103 | __set_bit(EV_REP, input->evbit); | ||
104 | |||
101 | ddata->input = input; | 105 | ddata->input = input; |
102 | 106 | ||
103 | for (i = 0; i < pdata->nbuttons; i++) { | 107 | for (i = 0; i < pdata->nbuttons; i++) { |
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index ec6ecd74781d..1289fa7623ca 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
@@ -15,6 +15,7 @@ struct gpio_keys_button { | |||
15 | struct gpio_keys_platform_data { | 15 | struct gpio_keys_platform_data { |
16 | struct gpio_keys_button *buttons; | 16 | struct gpio_keys_button *buttons; |
17 | int nbuttons; | 17 | int nbuttons; |
18 | unsigned int rep:1; /* enable input subsystem auto repeat */ | ||
18 | }; | 19 | }; |
19 | 20 | ||
20 | #endif | 21 | #endif |