Re: [PATCH] ASoC: cs35l56: Fix pm_runtime imbalance if suspending before first attach
From: Mark Brown
Date: Mon Aug 31 2026 - 09:18:03 EST
On Mon, Aug 31, 2026 at 10:45:06AM +0100, Richard Fitzgerald wrote:
> Remove the check for init_done in cs35l56_sdw_system_suspend(). Instead,
> protect the call to cs35l56_mask_soundwire_interrupts() to only be done
> if the amp is currently enumerated.
> @@ -386,11 +386,8 @@ static int __maybe_unused cs35l56_sdw_system_suspend(struct device *dev)
> {
> struct cs35l56_private *cs35l56 = dev_get_drvdata(dev);
>
> - if (!cs35l56->base.init_done)
> - return 0;
> -
> - /* runtime_resume unmasks the interrupt */
> - cs35l56_mask_soundwire_interrupts(cs35l56);
> + if (cs35l56->sdw_attached)
> + cs35l56_mask_soundwire_interrupts(cs35l56);
There's a thin race here on init - we call cs35l56_sdw_init() and unmask
the interrupts prior to setting sdw_attached.
Attachment:
signature.asc
Description: PGP signature