Skip to content

Commit 1ae5ddb

Browse files
vpelletierdtor
authored andcommitted
Input: gpio_keys_polled - request GPIO pin as input.
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: stable@vger.kernel.org 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>
1 parent 6b30c73 commit 1ae5ddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/gpio_keys_polled.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
246246
* convert it to descriptor.
247247
*/
248248
if (!button->gpiod && gpio_is_valid(button->gpio)) {
249-
unsigned flags = 0;
249+
unsigned flags = GPIOF_IN;
250250

251251
if (button->active_low)
252252
flags |= GPIOF_ACTIVE_LOW;

0 commit comments

Comments
 (0)