diff options
author | Vincent Pelletier <plr.vincent@gmail.com> | 2015-08-20 22:00:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-13 19:07:49 +0300 |
commit | ca1868ab9206637d98316a19e56a477b7a69432d (patch) | |
tree | 4320f6360615f19805734ca06462be4420bfd62e | |
parent | 7aadce453a529fdca8d8e2d4d7d494f9646748c4 (diff) | |
download | linux-ca1868ab9206637d98316a19e56a477b7a69432d.tar.xz |
Input: gpio_keys_polled - request GPIO pin as input.
commit 1ae5ddb6f8837558928a1a694c7b8af7f09fdd21 upstream.
GPIOF_IN flag was lost in:
Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO
descriptors").
Without this flag, legacy code path (for non-descriptor GPIO declarations)
would configure GPIO as output (0 meaning GPIOF_DIR_OUT | GPIOF_INIT_LOW).
Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/input/keyboard/gpio_keys_polled.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 097d7216d98e..c6dc644aa580 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) * convert it to descriptor. */ if (!button->gpiod && gpio_is_valid(button->gpio)) { - unsigned flags = 0; + unsigned flags = GPIOF_IN; if (button->active_low) flags |= GPIOF_ACTIVE_LOW; |