mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Vicente Bergas <vicencb@gmail.com>
To: barebox@lists.infradead.org
Cc: Vicente Bergas <vicencb@gmail.com>
Subject: [PATCH 1/4] gpio_keys: detect keys pressed before booting.
Date: Mon, 11 Mar 2013 00:36:04 +0100	[thread overview]
Message-ID: <1362958567-6110-2-git-send-email-vicencb@gmail.com> (raw)
In-Reply-To: <1362958567-6110-1-git-send-email-vicencb@gmail.com>

If a key is pressed but not released before booting and the key is
connected to an active low gpio it's not detected. This patch solves
that.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
---
 drivers/input/gpio_keys.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c
index b02e0ed..b439111 100644
--- a/drivers/input/gpio_keys.c
+++ b/drivers/input/gpio_keys.c
@@ -86,6 +86,8 @@ static int __init gpio_keys_probe(struct device_d *dev)
 			return ret;
 		}
 		gpio_direction_input(gpio);
+		pdata->buttons[i].previous_state =
+			pdata->buttons[i].active_low;
 	}
 
 	pdata->poller.func = gpio_key_poller;
-- 
1.8.1.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-10 23:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 23:36 [PATCH 0/4] ArchosG9: add keyboard input and new reset menu entries Vicente Bergas
2013-03-10 23:36 ` Vicente Bergas [this message]
2013-03-10 23:36 ` [PATCH 2/4] twl6030: add power button as an input key Vicente Bergas
2013-03-11 21:35   ` Sascha Hauer
2013-03-10 23:36 ` [PATCH 3/4] OMAP4: add command to select next boot device priority Vicente Bergas
2013-03-11 21:42   ` Sascha Hauer
2013-03-10 23:36 ` [PATCH 4/4] ArchosG9: add keyboard input and new reset menu entries Vicente Bergas
2013-03-11 21:45   ` Sascha Hauer
2013-03-12  0:09     ` vj

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=1362958567-6110-2-git-send-email-vicencb@gmail.com \
    --to=vicencb@gmail.com \
    --cc=barebox@lists.infradead.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