linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] GPIO-KEY: Add flag to allow gpio key auto repeat.
@ 2008-10-21  0:44 Dominic Curran
  0 siblings, 0 replies; only message in thread
From: Dominic Curran @ 2008-10-21  0:44 UTC (permalink / raw)
  To: linux-input

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>
---
 drivers/input/keyboard/gpio_keys.c |    4 ++++
 include/linux/gpio_keys.h          |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 drivers/input/keyboard/gpio_keys.c
 mode change 100644 => 100755 include/linux/gpio_keys.h

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
old mode 100644
new mode 100755
index 05f3f43..722529c
--- 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)
 	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++) {
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h
old mode 100644
new mode 100755
index ec6ecd7..1289fa7
--- a/include/linux/gpio_keys.h
+++ b/include/linux/gpio_keys.h
@@ -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
-- 
1.5.4.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-21  0:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21  0:44 [PATCH] GPIO-KEY: Add flag to allow gpio key auto repeat Dominic Curran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).