* [PATCH] mfd: arizona: Drop legacy irq_gpio handling
@ 2026-03-14 22:53 Linus Walleij
2026-03-16 8:58 ` Bartosz Golaszewski
2026-03-16 9:21 ` Charles Keepax
0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2026-03-14 22:53 UTC (permalink / raw)
To: Lee Jones, Bartosz Golaszewski
Cc: patches, linux-kernel, linux-gpio, Linus Walleij
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@kernel.org>
---
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@kernel.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mfd: arizona: Drop legacy irq_gpio handling
2026-03-14 22:53 [PATCH] mfd: arizona: Drop legacy irq_gpio handling Linus Walleij
@ 2026-03-16 8:58 ` Bartosz Golaszewski
2026-03-16 9:21 ` Charles Keepax
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-03-16 8:58 UTC (permalink / raw)
To: Linus Walleij
Cc: patches, linux-kernel, linux-gpio, Lee Jones, Bartosz Golaszewski
On Sat, 14 Mar 2026 23:53:27 +0100, Linus Walleij <linusw@kernel.org> said:
> 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@kernel.org>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: arizona: Drop legacy irq_gpio handling
2026-03-14 22:53 [PATCH] mfd: arizona: Drop legacy irq_gpio handling Linus Walleij
2026-03-16 8:58 ` Bartosz Golaszewski
@ 2026-03-16 9:21 ` Charles Keepax
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2026-03-16 9:21 UTC (permalink / raw)
To: Linus Walleij
Cc: Lee Jones, Bartosz Golaszewski, patches, linux-kernel, linux-gpio
On Sat, Mar 14, 2026 at 11:53:27PM +0100, Linus Walleij wrote:
> It turns out nothing in the kernel defines this platform
> data entry so just delete it along with all code handling
> it.
Should really also mention in the commit message that this is
removing the emulated edge triggered support from the driver. It
is not clear from this we are removing a feature.
This was definitely used out of tree, although in fairness that
was all sometime ago (~10 years). Makes me a little nervous but
probably ok to let it go now. I am at least not aware of anyone
who is keeping a platform using this going.
> --- 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
With out this the whole loop becomes useless so you might as well
remove that as well.
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-16 9:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-14 22:53 [PATCH] mfd: arizona: Drop legacy irq_gpio handling Linus Walleij
2026-03-16 8:58 ` Bartosz Golaszewski
2026-03-16 9:21 ` Charles Keepax
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox