[PATCH 45/48] clk: qcom: videocc-sm6350: Use common probe handling for always-on clocks
From: Abel Vesa
Date: Wed Sep 16 2026 - 06:45:04 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-sm6350.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/qcom/videocc-sm6350.c b/drivers/clk/qcom/videocc-sm6350.c
index 34bdc5aa865a..d3926f87497c 100644
--- a/drivers/clk/qcom/videocc-sm6350.c
+++ b/drivers/clk/qcom/videocc-sm6350.c
@@ -311,7 +311,17 @@ static const struct regmap_config video_cc_sm6350_regmap_config = {
.fast_io = true,
};
+static const u32 video_cc_sm6350_critical_cbcrs[] = {
+ 0x7018, /* VIDEO_CC_XO_CLK */
+};
+
+static const struct qcom_cc_driver_data video_cc_sm6350_driver_data = {
+ .clk_cbcrs = video_cc_sm6350_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(video_cc_sm6350_critical_cbcrs),
+};
+
static const struct qcom_cc_desc video_cc_sm6350_desc = {
+ .driver_data = &video_cc_sm6350_driver_data,
.config = &video_cc_sm6350_regmap_config,
.clks = video_cc_sm6350_clocks,
.num_clks = ARRAY_SIZE(video_cc_sm6350_clocks),
@@ -335,9 +345,6 @@ static int video_cc_sm6350_probe(struct platform_device *pdev)
clk_fabia_pll_configure(&video_pll0, regmap, &video_pll0_config);
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x7018); /* VIDEO_CC_XO_CLK */
-
return qcom_cc_really_probe(&pdev->dev, &video_cc_sm6350_desc, regmap);
}
--
2.54.0