Re: [PATCH v2 4/5] clk: qcom: common: Register clk_ref clocks from qcom_cc_desc

From: Abel Vesa

Date: Fri Nov 20 2026 - 05:20:20 EST


On 26-11-16 21:24:22, Stanislav Aleksandrov wrote:
> The clk_ref clocks model a clkref_en gate together with the supplies of
> the QREF block that feeds it. So far they can only be registered as a
> standalone clock provider with qcom_clk_ref_probe(), as on the TCSR of
> X1E80100 and Glymur.
>
> On Halliday the clkref_en registers are part of GCC, and the QREF
> supplies are shared with the UFS PHY: when UFS runtime suspend turns
> them off, the USB HS PHY loses its reference clock. The GCC driver
> needs to provide its clkrefs as clk_ref clocks next to its other
> clocks, so that their users keep the supplies on.
>
> Let a qcom_cc_desc carry clk_ref descriptions, indexed by clock ID like
> its other clocks. qcom_clk_ref_register() now registers a single clock,
> so qcom_cc_really_probe() allocates and registers only the populated
> entries, and qcom_cc_clk_hw_get() returns them for their indices. As
> with the other clocks, entries listed in protected-clocks are skipped.
> A clock ID used by both a clk_ref and a regmap clock fails the probe.
>
> Signed-off-by: Stanislav Aleksandrov <lightofmysoul@xxxxxxxxx>

Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>