[PATCH] mfd: arizona: Drop legacy irq_gpio handling

From: Linus Walleij

Date: Sat Mar 14 2026 - 18:53:46 EST


It turns out nothing in the kernel defines this platform
data entry so just delete it along with all code handling
it.

Signed-off-by: Linus Walleij <linusw@xxxxxxxxxx>
---
drivers/mfd/arizona-irq.c | 37 -------------------------------------
include/linux/mfd/arizona/pdata.h | 5 -----
2 files changed, 42 deletions(-)

diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index 544016d420fe..43d188a72ee2 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -136,21 +136,6 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)
dev_err(arizona->dev,
"Failed to read main IRQ status: %d\n", ret);
}
-#ifdef CONFIG_GPIOLIB_LEGACY
- /*
- * Poll the IRQ pin status to see if we're really done
- * if the interrupt controller can't do it for us.
- */
- if (!arizona->pdata.irq_gpio) {
- break;
- } else if (arizona->pdata.irq_flags & IRQF_TRIGGER_RISING &&
- gpio_get_value_cansleep(arizona->pdata.irq_gpio)) {
- poll = true;
- } else if (arizona->pdata.irq_flags & IRQF_TRIGGER_FALLING &&
- !gpio_get_value_cansleep(arizona->pdata.irq_gpio)) {
- poll = true;
- }
-#endif
} while (poll);

pm_runtime_put_autosuspend(arizona->dev);
@@ -350,28 +335,6 @@ int arizona_irq_init(struct arizona *arizona)
goto err_map_main_irq;
}

-#ifdef CONFIG_GPIOLIB_LEGACY
- /* Used to emulate edge trigger and to work around broken pinmux */
- if (arizona->pdata.irq_gpio) {
- if (gpio_to_irq(arizona->pdata.irq_gpio) != arizona->irq) {
- dev_warn(arizona->dev, "IRQ %d is not GPIO %d (%d)\n",
- arizona->irq, arizona->pdata.irq_gpio,
- gpio_to_irq(arizona->pdata.irq_gpio));
- arizona->irq = gpio_to_irq(arizona->pdata.irq_gpio);
- }
-
- ret = devm_gpio_request_one(arizona->dev,
- arizona->pdata.irq_gpio,
- GPIOF_IN, "arizona IRQ");
- if (ret != 0) {
- dev_err(arizona->dev,
- "Failed to request IRQ GPIO %d:: %d\n",
- arizona->pdata.irq_gpio, ret);
- arizona->pdata.irq_gpio = 0;
- }
- }
-#endif
-
ret = request_threaded_irq(arizona->irq, NULL, arizona_irq_thread,
flags, "arizona", arizona);

diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
index f72e6d4b14a7..20118bad869a 100644
--- a/include/linux/mfd/arizona/pdata.h
+++ b/include/linux/mfd/arizona/pdata.h
@@ -188,11 +188,6 @@ struct arizona_pdata {
/** Haptic actuator type */
unsigned int hap_act;

-#ifdef CONFIG_GPIOLIB_LEGACY
- /** GPIO for primary IRQ (used for edge triggered emulation) */
- int irq_gpio;
-#endif
-
/** General purpose switch control */
unsigned int gpsw;
};

---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260314-mfd-arizona-irq-6fe7fe179a09

Best regards,
--
Linus Walleij <linusw@xxxxxxxxxx>