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

From: Konrad Dybcio

Date: Mon May 25 2026 - 09:08:00 EST


On 5/22/26 9:26 PM, Ajay Kumar Nandam wrote:
>
>
> On 5/22/2026 6:55 PM, Konrad Dybcio wrote:
>> 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?
>
> Apologies for not including the Reviewed-by tag earlier — that was an oversight on my end.

I'm not sure we're on the same page. Please read:

https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

Konrad