Input: gpio_keys_polled - always use gpiod_get_value_cansleep
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 19 Oct 2016 23:36:19 +0000 (16:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 8 Nov 2016 00:24:29 +0000 (16:24 -0800)
commitea6aabf877d82fe10627f40069e0f3d412706a8a
tree7b9897bf407bb24e242333c436070f7348936c12
parent0f78ba96bbcf30a78224fe56f8fd72f87915afdd
Input: gpio_keys_polled - always use gpiod_get_value_cansleep

It does not matter if given GPIO may sleep or not when reading state,
polling is always done in a non-atomic context, so we should always
be able to simply use gpiod_get_value_cansleep().

Also let's note in the logs when we fail to read gpio state.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/gpio_keys_polled.c