Re: [PATCH v3] gpio: mvebu: convert to noirq suspend/resume to prevent interrupt storm on resume

From: Bartosz Golaszewski

Date: Tue Sep 29 2026 - 09:08:15 EST


On Tue, 29 Sep 2026 04:26:02 +0200, Rosen Penev <rosenp@xxxxxxxxx> said:
> The driver uses the legacy .suspend/.resume callbacks, but sets
> IRQCHIP_MASK_ON_SUSPEND on the irq_chip. During resume, the PM core
> runs dpm_resume_noirq() first, which calls irq_pm_resume() to unmask
> interrupts, and only then runs dpm_resume() which invokes the driver's
> .resume callback to restore GPIO registers (GPIO_IN_POL, GPIO_IO_CONF,
> mask registers).
>
> This ordering means interrupts are unmasked while the hardware is still
> in its reset state, potentially with incorrect polarities, causing
> spurious level-triggered interrupts before local IRQs are re-enabled.
>
> Convert the driver from legacy .suspend/.resume callbacks to noirq
> callbacks via dev_pm_ops. The noirq phase runs before resume_device_irqs()
> on resume and after suspend_device_irqs() on suspend, ensuring GPIO
> registers are restored before interrupts are unmasked.
>
> Assisted-by: LLM
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> ---

This doesn't apply on top of current gpio/for-next. Either rebase and and
resend or - if there are dependencies from current upstream - mention them
in the cover letter.

Bart