Skip to contentSkip to conversation

INPUT: Add flag to allow gpio-key input auto repeat.

PATCH New Dominic Curran 1 participant 1 message Oct 20, 2008 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 INPUT: Add flag to allow gpio-key input auto repeat.

Adds a flag to the gpio-keys driver to enable the input subsystems auto repeat function. Feature is turned on in board file.

---
 drivers/input/keyboard/gpio_keys.c |    4 ++++
 include/linux/gpio_keys.h          |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/input/keyboard/gpio_keys.c
index ec96b36..935d2e3 100644

drivers/input/keyboard/gpio_keys.c +0 -0
@@ -108,6 +108,10 @@ static int __devinit gpio_keys_probe(struct 

platform_device *pdev)
input->id.product = 0x0001;
input->id.version = 0x0100;

+ /* Enable auto repeat feature of Linux input subsystem */
+ if (pdata->rep)
+ set_bit(EV_REP, input->evbit);
+
ddata->input = input;

for (i = 0; i < pdata->nbuttons; i++) {

include/linux/gpio_keys.h +1 -0
index ec6ecd7..1289fa7 100644
@@ -15,6 +15,7 @@ struct gpio_keys_button {
 struct gpio_keys_platform_data {
 	struct gpio_keys_button *buttons;
 	int nbuttons;
+	unsigned int rep:1;		/* enable input subsystem auto repeat */
 };
 
 #endif
Signature · 1 line
1.5.4.1