[PATCH v2 0/3] ASoC: codecs: lpass-{tx,rx}-macro: switch to PM clock framework
From: Ajay Kumar Nandam
Date: Tue Jul 07 2026 - 05:46:17 EST
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.
Changes since v1:
- Dropped unnecessary NULL checks on npl before clk_set_rate() — clk APIs
handle NULL pointers gracefully (Konrad).
- Added patch 3/3 to check clk_set_rate() return values (Konrad).
[1] https://lore.kernel.org/linux-arm-msm/20260629-xo-sd-codec-v7-b4-v7-0-fb37ce457c42@xxxxxxxxxxxxxxxx/
---
Ajay Kumar Nandam (3):
ASoC: codecs: lpass-tx-macro: switch to PM clock framework for runtime PM
ASoC: codecs: lpass-rx-macro: switch to PM clock framework for runtime PM
ASoC: codecs: lpass-{tx,rx}-macro: check clk_set_rate() return value
sound/soc/codecs/Kconfig | 2 +
sound/soc/codecs/lpass-rx-macro.c | 116 +++++++++++++++----------------------
sound/soc/codecs/lpass-tx-macro.c | 117 +++++++++++++++++---------------------
3 files changed, 98 insertions(+), 137 deletions(-)
---
base-commit: 4f441960e691d37c880d2cc004de06bb5b6bd5e4
change-id: 20260703-xo-sd-codec-tx-rx-94538a2c6a18
Best regards,
--
Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>