Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: pca953x: Use PCA_LATCH_INT

The commit 0cdf21b34e30

("gpio: pca953x: set the PCA_PCAL flag also when matching by DT")

introduces a helper macro which tells that chip supports latched interrupts,
but the macro was never used for ACPI or legacy enumeration.

So, make use of it for legacy and ACPI enumeration.

Cc: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Andy Shevchenko and committed by
Linus Walleij
2870b3c5 a422bf11

+5 -5
+5 -5
drivers/gpio/gpio-pca953x.c
··· 65 65 66 66 #define PCA_INT 0x0100 67 67 #define PCA_PCAL 0x0200 68 - #define PCA_LATCH_INT (PCA_PCAL | PCA_INT) 68 + #define PCA_LATCH_INT (PCA_PCAL | PCA_INT) 69 69 #define PCA953X_TYPE 0x1000 70 70 #define PCA957X_TYPE 0x2000 71 71 #define PCA_TYPE_MASK 0xF000 ··· 88 88 { "pca9575", 16 | PCA957X_TYPE | PCA_INT, }, 89 89 { "pca9698", 40 | PCA953X_TYPE, }, 90 90 91 - { "pcal6416", 16 | PCA953X_TYPE | PCA_INT | PCA_PCAL, }, 92 - { "pcal6524", 24 | PCA953X_TYPE | PCA_INT | PCA_PCAL, }, 93 - { "pcal9555a", 16 | PCA953X_TYPE | PCA_INT | PCA_PCAL, }, 91 + { "pcal6416", 16 | PCA953X_TYPE | PCA_LATCH_INT, }, 92 + { "pcal6524", 24 | PCA953X_TYPE | PCA_LATCH_INT, }, 93 + { "pcal9555a", 16 | PCA953X_TYPE | PCA_LATCH_INT, }, 94 94 95 95 { "max7310", 8 | PCA953X_TYPE, }, 96 96 { "max7312", 16 | PCA953X_TYPE | PCA_INT, }, ··· 109 109 MODULE_DEVICE_TABLE(i2c, pca953x_id); 110 110 111 111 static const struct acpi_device_id pca953x_acpi_ids[] = { 112 - { "INT3491", 16 | PCA953X_TYPE | PCA_INT | PCA_PCAL, }, 112 + { "INT3491", 16 | PCA953X_TYPE | PCA_LATCH_INT, }, 113 113 { } 114 114 }; 115 115 MODULE_DEVICE_TABLE(acpi, pca953x_acpi_ids);