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

From: Abel Vesa

Date: Wed Sep 16 2026 - 06:50:08 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-sm7150.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sm7150.c b/drivers/clk/qcom/dispcc-sm7150.c
index b9df6153e50f..da7610856e56 100644
--- a/drivers/clk/qcom/dispcc-sm7150.c
+++ b/drivers/clk/qcom/dispcc-sm7150.c
@@ -963,7 +963,17 @@ static const struct regmap_config dispcc_sm7150_regmap_config = {
.fast_io = true,
};

+static const u32 dispcc_sm7150_critical_cbcrs[] = {
+ 0x605c, /* DISPCC_XO_CLK */
+};
+
+static const struct qcom_cc_driver_data dispcc_sm7150_driver_data = {
+ .clk_cbcrs = dispcc_sm7150_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(dispcc_sm7150_critical_cbcrs),
+};
+
static const struct qcom_cc_desc dispcc_sm7150_desc = {
+ .driver_data = &dispcc_sm7150_driver_data,
.config = &dispcc_sm7150_regmap_config,
.clks = dispcc_sm7150_clocks,
.num_clks = ARRAY_SIZE(dispcc_sm7150_clocks),
@@ -991,9 +1001,6 @@ static int dispcc_sm7150_probe(struct platform_device *pdev)
/* Enable clock gating for DSI and MDP clocks */
regmap_update_bits(regmap, 0x8000, 0x7f0, 0x7f0);

- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x605c); /* DISPCC_XO_CLK */
-
return qcom_cc_really_probe(&pdev->dev, &dispcc_sm7150_desc, regmap);
}


--
2.54.0