]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: arizona: Correct handling for reading input GPIOs
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 5 Apr 2017 15:50:46 +0000 (16:50 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 7 Apr 2017 10:14:04 +0000 (12:14 +0200)
commitbbf09227970a34692a93a30abcd824bcc9be06be
treef8897a4c50430564183dbf3b0555b443d85771bf
parentedefbe90bcad0b20c36412387f6ab9822824490c
gpio: arizona: Correct handling for reading input GPIOs

The GPIO register is cached since all the configuration resides within
it, however, this means for input GPIOs the driver will not return the
actual state but the last value written to the register cache.

To correct this in the case of reading an input GPIO resume the CODEC
and drop the cache for the input register to ensure an actual hardware
read takes place.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-arizona.c