summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-pca953x.c
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2018-05-17 07:59:47 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-05-23 14:49:09 +0300
commit0cdf21b34e3062af8da0a2a1c419654263c21b87 (patch)
treefbdfbc2eae32eba628deb30cd9623c0fe6eecebc /drivers/gpio/gpio-pca953x.c
parent0a70fe00efea7c6ac087a10aa57131e59d63e194 (diff)
downloadlinux-0cdf21b34e3062af8da0a2a1c419654263c21b87.tar.xz
gpio: pca953x: set the PCA_PCAL flag also when matching by DT
The of_device_table is missing the PCA_PCAL flag so the pcal6524 would be operated in tca6424 compatibility mode which does not handle the new interrupt mask registers. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-pca953x.c')
-rw-r--r--drivers/gpio/gpio-pca953x.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index d01e09d37573..ae9b1ed76951 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -58,6 +58,7 @@
#define PCA_GPIO_MASK 0x00FF
#define PCA_INT 0x0100
#define PCA_PCAL 0x0200
+#define PCA_LATCH_INT (PCA_PCAL | PCA_INT)
#define PCA953X_TYPE 0x1000
#define PCA957X_TYPE 0x2000
#define PCA_TYPE_MASK 0xF000
@@ -954,8 +955,8 @@ static const struct of_device_id pca953x_dt_ids[] = {
{ .compatible = "nxp,pca9575", .data = OF_957X(16, PCA_INT), },
{ .compatible = "nxp,pca9698", .data = OF_953X(40, 0), },
- { .compatible = "nxp,pcal6524", .data = OF_953X(24, PCA_INT), },
- { .compatible = "nxp,pcal9555a", .data = OF_953X(16, PCA_INT), },
+ { .compatible = "nxp,pcal6524", .data = OF_953X(24, PCA_LATCH_INT), },
+ { .compatible = "nxp,pcal9555a", .data = OF_953X(16, PCA_LATCH_INT), },
{ .compatible = "maxim,max7310", .data = OF_953X( 8, 0), },
{ .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), },