Re: [PATCH] mfd: arizona: Drop legacy irq_gpio handling

From: Charles Keepax

Date: Mon Mar 16 2026 - 05:23:51 EST


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