[PATCH 0/2] ASoC: cs35l3x: drain threaded IRQs before runtime suspend

From: Runyu Xiao

Date: Thu Jun 11 2026 - 12:27:26 EST


Both cs35l33 and cs35l34 can enter runtime suspend while their threaded
IRQ handlers are still reachable. The suspend path then switches the
driver into regcache cache-only mode and powers the codec down, while
the IRQ thread still expects live status-register access.

This issue was found by our static analysis tool and manually audited on
Linux v6.18.21. Directed QEMU no-device validation further showed that,
after runtime_suspend() completed, the real threaded handlers could
still be injected and would continue past volatile regmap read failures
into their release/update paths.

This series keeps the fix on the suspend actor and applies the same
runtime-suspend/threaded-IRQ ordering repair boundary to both drivers:

- track whether request_threaded_irq() actually succeeded
- disable_irq() before cache_only/power-off in runtime suspend
- enable_irq() only after regcache_sync() in runtime resume

That drains any in-flight threaded handler and blocks new IRQ handling
while the codec is suspended, without mixing in larger IRQ-thread
defensive cleanups.

Build-tested by compiling cs35l33.o and cs35l34.o.

No cs35l33/cs35l34 hardware was available for end-to-end runtime
testing.

Runyu Xiao (2):
ASoC: cs35l33: drain threaded IRQ before runtime suspend
ASoC: cs35l34: drain threaded IRQ before runtime suspend

sound/soc/codecs/cs35l33.c | 14 ++++++++++++--
sound/soc/codecs/cs35l34.c | 14 ++++++++++++--
2 files changed, 24 insertions(+), 4 deletions(-)

--
2.34.1