ASoC: codecs: lpass-{tx,rx}-macro: switch to PM clock framework

Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com> says:

Convert the LPASS TX and RX macro codec drivers to runtime PM clock
management using the PM clock framework, completing the LPASS macro PM
clock migration started with the WSA/VA macros [1].

The conversion follows the same pattern established in the WSA/VA series:
- PM clocks created and populated from DT via devm_pm_clk_create() +
  of_pm_clk_add_clks(), inlined in probe (no helper wrapper).
- Runtime PM enabled via devm_pm_runtime_enable() with 100 ms autosuspend.
- runtime_suspend: regcache_cache_only first, pm_clk_suspend, then
  regcache_mark_dirty only on success; rollback on failure.
- runtime_resume: pm_clk_resume with regcache unwind, regcache_sync with
  full unwind on failure.
- SWR clock gate prepare/unprepare routed through pm_runtime_resume_and_get
  / pm_runtime_put_autosuspend.
- Probe error paths tightened with dev_warn on PM put failures.
- Empty remove callbacks dropped (devm handles cleanup).
- PM_CLK Kconfig dependency added.

Patch 3 adds clk_set_rate() return value checking as suggested by Konrad.

[1] https://lore.kernel.org/linux-arm-msm/20260629-xo-sd-codec-v7-b4-v7-0-fb37ce457c42@oss.qualcomm.com/

Link: https://patch.msgid.link/20260707-xo-sd-codec-tx-rx-v2-0-f61b4622f97f@oss.qualcomm.com
This commit is contained in:
Mark Brown 2026-07-10 18:42:59 +01:00
commit a5ee3180a2
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
3 changed files with 95 additions and 150 deletions