[PATCH 1/4] gpio_keys: detect keys pressed before booting.
Vicente Bergas
vicencb at gmail.com
Sun Mar 10 19:36:04 EDT 2013
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 at 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
More information about the barebox
mailing list