Skip to content

Commit

Permalink
Input: gpio_keys_polled - request GPIO pin as input.
Browse files Browse the repository at this point in the history
GPIOF_IN flag was lost in:
Commit 633a21d("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).

Cc: [email protected]
Signed-off-by: Vincent Pelletier <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
vpelletier authored and dtor committed Aug 20, 2015
1 parent 6b30c73 commit 1ae5ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/gpio_keys_polled.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1ae5ddb

Please sign in to comment.