diff options
author | Vicente Bergas <vicencb@gmail.com> | 2013-03-16 23:59:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-25 10:21:21 +0100 |
commit | 5a1d6da675ff39787e1ad26e8cbe074d531a63fa (patch) | |
tree | 6121d5753672ab43e6c981557e41632a8bebc26b /drivers/input | |
parent | a3fd4dbf8001edae7f037c6d1e686f4f4c2ebd8f (diff) | |
download | barebox-5a1d6da675ff39787e1ad26e8cbe074d531a63fa.tar.gz barebox-5a1d6da675ff39787e1ad26e8cbe074d531a63fa.tar.xz |
gpio_keys: detect keys pressed before booting
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/gpio_keys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c index b02e0ede34..b43911149e 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; |