Re: [PATCH v10 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
From: Ajay Kumar Nandam
Date: Mon Oct 05 2026 - 02:07:20 EST
> +static int lpass_va_csr_hb_prepare(struct clk_hw *hw)
> +{
> + struct lpass_va_csr *csr = to_lpass_va_csr(hw);
> +
> + return pm_runtime_resume_and_get(csr->dev);
> +}
Since this clock is registered with devm_clk_register_regmap(dev, ...)
after devm_pm_runtime_enable(dev), the clock core should already mark the
provider as runtime-PM managed and take a provider PM reference in
clk_core_prepare() before calling the clock's .prepare callback. It also
drops that reference after .unprepare.
So this explicit pm_runtime_resume_and_get()/pm_runtime_put_sync() pair
looks like it double-counts the same provider device rather than adding new
protection for the regmap gate ops. Is the extra reference intentional here?
If not, the custom prepare/unprepare callbacks could probably be dropped and
the driver could rely on the clock core's provider runtime-PM handling.