]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcb40bfb81f9ed1afb5a651c0228dbfab796e9858
tree34b2b86251c9e770813ce87a9f7998dc37ef4ab5
parent48b0fc298f73b9bec3405f8edf9270231024d0c5
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