Commit 0cdf21b3 authored by H. Nikolaus Schaller's avatar H. Nikolaus Schaller Committed by Linus Walleij

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: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarH. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 0a70fe00
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#define PCA_GPIO_MASK 0x00FF #define PCA_GPIO_MASK 0x00FF
#define PCA_INT 0x0100 #define PCA_INT 0x0100
#define PCA_PCAL 0x0200 #define PCA_PCAL 0x0200
#define PCA_LATCH_INT (PCA_PCAL | PCA_INT)
#define PCA953X_TYPE 0x1000 #define PCA953X_TYPE 0x1000
#define PCA957X_TYPE 0x2000 #define PCA957X_TYPE 0x2000
#define PCA_TYPE_MASK 0xF000 #define PCA_TYPE_MASK 0xF000
...@@ -954,8 +955,8 @@ static const struct of_device_id pca953x_dt_ids[] = { ...@@ -954,8 +955,8 @@ static const struct of_device_id pca953x_dt_ids[] = {
{ .compatible = "nxp,pca9575", .data = OF_957X(16, PCA_INT), }, { .compatible = "nxp,pca9575", .data = OF_957X(16, PCA_INT), },
{ .compatible = "nxp,pca9698", .data = OF_953X(40, 0), }, { .compatible = "nxp,pca9698", .data = OF_953X(40, 0), },
{ .compatible = "nxp,pcal6524", .data = OF_953X(24, PCA_INT), }, { .compatible = "nxp,pcal6524", .data = OF_953X(24, PCA_LATCH_INT), },
{ .compatible = "nxp,pcal9555a", .data = OF_953X(16, PCA_INT), }, { .compatible = "nxp,pcal9555a", .data = OF_953X(16, PCA_LATCH_INT), },
{ .compatible = "maxim,max7310", .data = OF_953X( 8, 0), }, { .compatible = "maxim,max7310", .data = OF_953X( 8, 0), },
{ .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), }, { .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment