[PATCH 05/48] clk: qcom: dispcc-sc7280: Use common probe handling for always-on clocks

From: Abel Vesa

Date: Wed Sep 16 2026 - 06:35:41 EST


Describe the always-on branches in a critical_cbcrs array and reference
it through qcom_cc_driver_data. Let qcom_cc_really_probe() enable these
branches instead of programming them directly in the driver's probe.

Assisted-by: LLM
Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
---
drivers/clk/qcom/dispcc-sc7280.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sc7280.c b/drivers/clk/qcom/dispcc-sc7280.c
index d11265debaf9..24a65cbb1ecf 100644
--- a/drivers/clk/qcom/dispcc-sc7280.c
+++ b/drivers/clk/qcom/dispcc-sc7280.c
@@ -860,7 +860,17 @@ static const struct regmap_config disp_cc_sc7280_regmap_config = {
.fast_io = true,
};

+static const u32 disp_cc_sc7280_critical_cbcrs[] = {
+ 0x5008, /* DISP_CC_XO_CLK */
+};
+
+static const struct qcom_cc_driver_data disp_cc_sc7280_driver_data = {
+ .clk_cbcrs = disp_cc_sc7280_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(disp_cc_sc7280_critical_cbcrs),
+};
+
static const struct qcom_cc_desc disp_cc_sc7280_desc = {
+ .driver_data = &disp_cc_sc7280_driver_data,
.config = &disp_cc_sc7280_regmap_config,
.clks = disp_cc_sc7280_clocks,
.num_clks = ARRAY_SIZE(disp_cc_sc7280_clocks),
@@ -886,9 +896,6 @@ static int disp_cc_sc7280_probe(struct platform_device *pdev)

clk_lucid_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);

- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x5008); /* DISP_CC_XO_CLK */
-
return qcom_cc_really_probe(&pdev->dev, &disp_cc_sc7280_desc, regmap);
}


--
2.54.0