Commit b67b4b11 authored by Dominic Curran's avatar Dominic Curran Committed by Dmitry Torokhov

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: default avatarDominic Curran <dcurran@ti.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent b4a3ac9a
...@@ -98,6 +98,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) ...@@ -98,6 +98,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
input->id.product = 0x0001; input->id.product = 0x0001;
input->id.version = 0x0100; input->id.version = 0x0100;
/* Enable auto repeat feature of Linux input subsystem */
if (pdata->rep)
__set_bit(EV_REP, input->evbit);
ddata->input = input; ddata->input = input;
for (i = 0; i < pdata->nbuttons; i++) { for (i = 0; i < pdata->nbuttons; i++) {
......
...@@ -15,6 +15,7 @@ struct gpio_keys_button { ...@@ -15,6 +15,7 @@ struct gpio_keys_button {
struct gpio_keys_platform_data { struct gpio_keys_platform_data {
struct gpio_keys_button *buttons; struct gpio_keys_button *buttons;
int nbuttons; int nbuttons;
unsigned int rep:1; /* enable input subsystem auto repeat */
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment