Re: [PATCH v4 0/3] iio: proximity: sx93xx: keep the IRQ balanced across suspend and resume

From: Arnav Kapoor

Date: Thu Nov 12 2026 - 17:31:15 EST


On Sun, Nov 08, 2026 at 01:29:04AM +0000, Jonathan Cameron wrote:
> All 3 of these look fine to me, but given they aren't totally trivial
> I'm going to leave them for a while in the hope someone will test at least
> one of them! If it looks like that's not happening I may pick them
> up in a week or two.

Please don't pick these up yet, I found a problem with v4.

Moving disable_irq_nosync() to the end of suspend leaves the interrupt
enabled while suspend holds data->mutex for the register writes. If the
sensor fires then, the threaded handler blocks on the mutex, and since
disable_irq_nosync() doesn't wait for it, it runs once suspend returns,
against a paused sensor. Sashiko pointed this out on sx9310, and sx9324
and sx9360 have the same pattern.

I'll send v5 that calls disable_irq() before taking the mutex and
enables the interrupt again if suspend fails.

Thanks,
Arnav