]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clk: qcom: common: Add support to register rcg dfs in qcom_cc_really_probe
authorLuca Weiss <luca.weiss@fairphone.com>
Tue, 15 Jul 2025 07:19:01 +0000 (09:19 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 17 Jul 2025 04:17:04 +0000 (23:17 -0500)
Add support to register the rcg dfs in qcom_cc_really_probe(). This
allows users to move the call from the probe function to static
properties.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250715-sm7635-clocks-v3-1-18f9faac4984@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/common.c
drivers/clk/qcom/common.h

index b3838d885db25f183979576e5c685c07dc6a7049..37c3008e6c1be1f083d0093d2659e31dd7978497 100644 (file)
@@ -390,6 +390,16 @@ int qcom_cc_really_probe(struct device *dev,
                        goto put_rpm;
        }
 
+       if (desc->driver_data &&
+           desc->driver_data->dfs_rcgs &&
+           desc->driver_data->num_dfs_rcgs) {
+               ret = qcom_cc_register_rcg_dfs(regmap,
+                                              desc->driver_data->dfs_rcgs,
+                                              desc->driver_data->num_dfs_rcgs);
+               if (ret)
+                       goto put_rpm;
+       }
+
        cc->rclks = rclks;
        cc->num_rclks = num_clks;
 
index 0f4b2d40c65cf94de694226f63ca30f4181d0ce5..953c91f7b14502546d8ade0dccc4790fcbb53ddb 100644 (file)
@@ -30,6 +30,8 @@ struct qcom_cc_driver_data {
        size_t num_alpha_plls;
        u32 *clk_cbcrs;
        size_t num_clk_cbcrs;
+       const struct clk_rcg_dfs_data *dfs_rcgs;
+       size_t num_dfs_rcgs;
        void (*clk_regs_configure)(struct device *dev, struct regmap *regmap);
 };