gpiolib: Show correct direction from the beginning
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Fri, 5 Oct 2018 06:53:00 +0000 (08:53 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 10 Oct 2018 08:32:00 +0000 (10:32 +0200)
commit3edfb7bd76bd1cba6b917736943dffd799deed8a
treee136cfbf483987ea7a488d40ac05a63fdafcc031
parent6f0ec09afe278ea2a5d63f31b754db6655c69078
gpiolib: Show correct direction from the beginning

Current code assumes that the direction is input if direction_input
function is set.
This might not be the case on GPIOs with programmable direction.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c