Re: [PATCH v5 1/3] ASoC: codecs: lpass-wsa-macro: Switch to PM clock framework for runtime PM

From: Konrad Dybcio

Date: Fri May 22 2026 - 09:53:38 EST


On 5/22/26 3:04 PM, Ajay Kumar Nandam wrote:
> Convert the LPASS WSA macro codec driver to use the PM clock framework
> for runtime power management.
>
> The driver now relies on pm_clk helpers and runtime PM instead of
> manually enabling and disabling macro, dcodec, mclk, npl, and fsgen
> clocks. Runtime suspend and resume handling is delegated to the PM
> core via pm_clk_suspend() and pm_clk_resume(), while existing runtime
> PM callbacks continue to manage regcache state.
>
> This ensures clocks are enabled only when the WSA macro is active,
> improves power efficiency on LPASS platforms supporting LPI/island
> modes, and aligns the driver with common ASoC runtime PM patterns used
> across Qualcomm LPASS codec drivers.
>
> Keep the SWR gate runtime-PM reference from SWR clock enable until
> disable so autosuspend does not gate clocks while SWR is prepared.
>
> Add a PM dependency for SND_SOC_LPASS_WSA_MACRO so PM clock helpers are
> available when this driver is built.
>
> Suggested-by: Mark Brown <broonie@xxxxxxxxxx>

You added this tag, but was the entire content of this patch sparked
by Mark's suggestion?

Konrad