linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominic Curran <dcurran@ti.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 1/3] [OMAPZOOM] INPUT: Add flag to allow gpio-key input auto repeat.
Date: Mon, 20 Oct 2008 14:46:04 -0500	[thread overview]
Message-ID: <200810201446.04719.dcurran@ti.com> (raw)

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

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(-)

diff --git a/drivers/input/keyboard/gpio_keys.c 
b/drivers/input/keyboard/gpio_keys.c
index ec96b36..935d2e3 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -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++) {
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h
index ec6ecd7..1289fa7 100644
--- 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


                 reply	other threads:[~2008-10-20 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810201446.04719.dcurran@ti.com \
    --to=dcurran@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).