Re: [PATCH v6 1/3] ASoC: codecs: lpass-wsa-macro: Switch to PM clock framework for runtime PM
From: Konrad Dybcio
Date: Tue Jun 23 2026 - 06:36:04 EST
On 6/23/26 9:17 AM, Ajay Kumar Nandam wrote:
> Convert the LPASS WSA macro codec driver to runtime PM clock management by
> using the PM clock framework.
>
> Replace manual macro/dcodec/mclk/npl/fsgen clock toggling with PM clock
> helpers and runtime PM callbacks. Keep the SWR gate runtime PM reference
> from SWR clock enable until disable so autosuspend does not gate clocks
> while SWR is still prepared.
>
> Set autosuspend delay to 100 ms so PM-clock-managed votes are dropped soon
> after idle while still avoiding suspend/resume churn on short gaps.
>
> Add a PM_CLK dependency to SND_SOC_LPASS_WSA_MACRO since this patch
> introduces PM clock APIs.
>
> Tighten error unwind by checking pm_runtime_put_sync_suspend() in probe and
> by restoring regcache state if pm_clk_resume()/regcache_sync() fails.
>
> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>
> ---
[...]
> static void wsa_macro_remove(struct platform_device *pdev)
> {
> - struct wsa_macro *wsa = dev_get_drvdata(&pdev->dev);
> -
> - clk_disable_unprepare(wsa->macro);
> - clk_disable_unprepare(wsa->dcodec);
> - clk_disable_unprepare(wsa->mclk);
> - clk_disable_unprepare(wsa->npl);
> - clk_disable_unprepare(wsa->fsgen);
> }
Can we just drop the now-empty function?
Konrad