gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)
authorPuyou Lu <puyou.lu@gmail.com>
Fri, 6 May 2022 08:06:30 +0000 (16:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:30:11 +0000 (12:30 +0200)
commite75dd874e02ad96c336d4bb799623f3668b61fb5
tree57ffc1eafe1a76eda593a893e2cacae8cd302557
parent8ec1096a09f1556eb7fe93e40375ef58a6ecc0ef
gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)

commit dba785798526a3282cc4d0f0ea751883715dbbb4 upstream.

When one port's input state get inverted (eg. from low to hight) after
pca953x_irq_setup but before setting irq_mask (by some other driver such as
"gpio-keys"), the next inversion of this port (eg. from hight to low) will not
be triggered any more (because irq_stat is not updated at the first time). Issue
should be fixed after this commit.

Fixes: 89ea8bbe9c3e ("gpio: pca953x.c: add interrupt handling capability")
Signed-off-by: Puyou Lu <puyou.lu@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-pca953x.c