pinctrl: intel: Set pin direction properly
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Jan 2017 12:07:22 +0000 (14:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:40:24 +0000 (14:40 +0200)
commit849f2d0665e049c21dbac8c0fa566a8ac04fead5
tree2efe3321fb5d0bdaaf3839eb66627a855ec72ac4
parent3a6edbc95ba0df871e1eb72a411c0fa06644785e
pinctrl: intel: Set pin direction properly

[ Upstream commit 17fab473693e8357a9aa6fee4fbed6c13a34bd81 ]

There are two bits in the PADCFG0 register to configure direction, one per
TX/RX buffers.

For now we wrongly assume that the GPIO is always requested before it is being
used, which is not true when the GPIO is used through irqchip. In this case the
GPIO is never requested and we never enable RX buffer for it.

Fix this by setting both bits accordingly.

Reported-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/intel/pinctrl-intel.c