[PATCH 46/48] clk: qcom: videocc-sm7150: Use common probe handling for always-on clocks
From: Abel Vesa
Date: Wed Sep 16 2026 - 06:45:34 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/videocc-sm7150.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/qcom/videocc-sm7150.c b/drivers/clk/qcom/videocc-sm7150.c
index 8d2e00799f96..32bad5e09056 100644
--- a/drivers/clk/qcom/videocc-sm7150.c
+++ b/drivers/clk/qcom/videocc-sm7150.c
@@ -313,7 +313,17 @@ static const struct regmap_config videocc_sm7150_regmap_config = {
.fast_io = true,
};
+static const u32 videocc_sm7150_critical_cbcrs[] = {
+ 0x984, /* VIDEOCC_XO_CLK */
+};
+
+static const struct qcom_cc_driver_data videocc_sm7150_driver_data = {
+ .clk_cbcrs = videocc_sm7150_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(videocc_sm7150_critical_cbcrs),
+};
+
static const struct qcom_cc_desc videocc_sm7150_desc = {
+ .driver_data = &videocc_sm7150_driver_data,
.config = &videocc_sm7150_regmap_config,
.clks = videocc_sm7150_clocks,
.num_clks = ARRAY_SIZE(videocc_sm7150_clocks),
@@ -337,9 +347,6 @@ static int videocc_sm7150_probe(struct platform_device *pdev)
clk_fabia_pll_configure(&videocc_pll0, regmap, &videocc_pll0_config);
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x984); /* VIDEOCC_XO_CLK */
-
return qcom_cc_really_probe(&pdev->dev, &videocc_sm7150_desc, regmap);
}
--
2.54.0