[PATCH 03/48] clk: qcom: camcc-sm7150: Use common probe handling for always-on clocks
From: Abel Vesa
Date: Wed Sep 16 2026 - 06:52:33 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/camcc-sm7150.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/qcom/camcc-sm7150.c b/drivers/clk/qcom/camcc-sm7150.c
index 6f75689e9847..d06258327ba7 100644
--- a/drivers/clk/qcom/camcc-sm7150.c
+++ b/drivers/clk/qcom/camcc-sm7150.c
@@ -2008,7 +2008,17 @@ static const struct regmap_config camcc_sm7150_regmap_config = {
.fast_io = true,
};
+static const u32 camcc_sm7150_critical_cbcrs[] = {
+ 0xc1a0, /* CAMCC_GDSC_CLK */
+};
+
+static const struct qcom_cc_driver_data camcc_sm7150_driver_data = {
+ .clk_cbcrs = camcc_sm7150_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(camcc_sm7150_critical_cbcrs),
+};
+
static const struct qcom_cc_desc camcc_sm7150_desc = {
+ .driver_data = &camcc_sm7150_driver_data,
.config = &camcc_sm7150_regmap_config,
.clk_hws = camcc_sm7150_hws,
.num_clk_hws = ARRAY_SIZE(camcc_sm7150_hws),
@@ -2038,9 +2048,6 @@ static int camcc_sm7150_probe(struct platform_device *pdev)
clk_fabia_pll_configure(&camcc_pll3, regmap, &camcc_pll3_config);
clk_fabia_pll_configure(&camcc_pll4, regmap, &camcc_pll3_config);
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0xc1a0); /* CAMCC_GDSC_CLK */
-
return qcom_cc_really_probe(&pdev->dev, &camcc_sm7150_desc, regmap);
}
--
2.54.0