diff mbox series

[v1] gpio: pca953x: Use PCA_LATCH_INT

Message ID 20190304112030.53371-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1] gpio: pca953x: Use PCA_LATCH_INT | expand

Commit Message

Andy Shevchenko March 4, 2019, 11:20 a.m. UTC
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>
---
 drivers/gpio/gpio-pca953x.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Linus Walleij March 8, 2019, 8:34 a.m. UTC | #1
Hi Andy!

On Mon, Mar 4, 2019 at 12:20 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> 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>

This doesn't apply on my "devel" (the same as sent to Torvalds)
for one or other reason. I am basing my "fixes" on that.

Could you check and resend if it needs adjustments?

Maybe the mess is on my end since this is the second patch
with this problem today, sorry in that case :/

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 0dc96419efe3..abcab3b756f6 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -65,7 +65,7 @@ 
 
 #define PCA_INT			0x0100
 #define PCA_PCAL		0x0200
-#define PCA_LATCH_INT (PCA_PCAL | PCA_INT)
+#define PCA_LATCH_INT		(PCA_PCAL | PCA_INT)
 #define PCA953X_TYPE		0x1000
 #define PCA957X_TYPE		0x2000
 #define PCA_TYPE_MASK		0xF000
@@ -88,8 +88,8 @@  static const struct i2c_device_id pca953x_id[] = {
 	{ "pca9575", 16 | PCA957X_TYPE | PCA_INT, },
 	{ "pca9698", 40 | PCA953X_TYPE, },
 
-	{ "pcal6524", 24 | PCA953X_TYPE | PCA_INT | PCA_PCAL, },
-	{ "pcal9555a", 16 | PCA953X_TYPE | PCA_INT | PCA_PCAL, },
+	{ "pcal6524", 24 | PCA953X_TYPE | PCA_LATCH_INT, },
+	{ "pcal9555a", 16 | PCA953X_TYPE | PCA_LATCH_INT, },
 
 	{ "max7310", 8  | PCA953X_TYPE, },
 	{ "max7312", 16 | PCA953X_TYPE | PCA_INT, },
@@ -108,7 +108,7 @@  static const struct i2c_device_id pca953x_id[] = {
 MODULE_DEVICE_TABLE(i2c, pca953x_id);
 
 static const struct acpi_device_id pca953x_acpi_ids[] = {
-	{ "INT3491", 16 | PCA953X_TYPE | PCA_INT | PCA_PCAL, },
+	{ "INT3491", 16 | PCA953X_TYPE | PCA_LATCH_INT, },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, pca953x_acpi_ids);