gpio: pca953x: Clear irq trigger type on irq shutdown
authorGrigoryev Denis <grigoryev@fastwel.ru>
Fri, 4 May 2018 16:53:18 +0000 (16:53 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 23 May 2018 09:47:26 +0000 (11:47 +0200)
commit0a70fe00efea7c6ac087a10aa57131e59d63e194
tree34b2b86251c9e770813ce87a9f7998dc37ef4ab5
parent060f3ebf6a9a4a92dd92149e6ebffae10679ed17
gpio: pca953x: Clear irq trigger type on irq shutdown

The driver stores the result of irq_set_type() in the internal variables
irq_trig_raise and irq_trig_fall, which later are used to determine
the GPIOs that must be re-configured as input. These variables retain their
value between gpiolib's  export / unexport, resulting in an incorrect
state in some cases. The corresponding bits in the variables
irq_trig_raise and irq_trig_fall should be cleared in irq_shutdown().

Signed-off-by: Denis Grigoryev <grigoryev@fastwel.ru>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c