]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: Fix direction setting when configure an IRQ
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 5 Jun 2020 13:40:35 +0000 (16:40 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 16 Jun 2020 09:22:41 +0000 (11:22 +0200)
commit70a28da31065e0f65492cace5f1557b8b8f64667
tree302195bd7433448399e01cbcdee7152f26ee2897
parent3baa152321aaa74f2b899415adcac92a39f2947d
gpio: pca953x: Fix direction setting when configure an IRQ

The commit 5c79df6a8002 ("gpio: pca953x: Zap ad-hoc reg_direction cache")
seems inadvertently made a typo in pca953x_irq_bus_sync_unlock().

When the direction bit is 1 it means input, and the piece of code in question
was looking for output ones that should be turned to inputs.

Fix direction setting when configure an IRQ by injecting a bitmap complement
operation.

Fixes: 5c79df6a8002 ("gpio: pca953x: Zap ad-hoc reg_direction cache")
Depends-on: b1a814da17f9 ("gpio: pca953x: convert to use bitmap API")
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-pca953x.c