Skip to content

Commit b21b5b3

Browse files
lweiss-fairphoneandersson
authored andcommitted
clk: qcom: common: Add support to register rcg dfs in qcom_cc_really_probe
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 <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent eb1af6e commit b21b5b3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

drivers/clk/qcom/common.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,16 @@ int qcom_cc_really_probe(struct device *dev,
390390
goto put_rpm;
391391
}
392392

393+
if (desc->driver_data &&
394+
desc->driver_data->dfs_rcgs &&
395+
desc->driver_data->num_dfs_rcgs) {
396+
ret = qcom_cc_register_rcg_dfs(regmap,
397+
desc->driver_data->dfs_rcgs,
398+
desc->driver_data->num_dfs_rcgs);
399+
if (ret)
400+
goto put_rpm;
401+
}
402+
393403
cc->rclks = rclks;
394404
cc->num_rclks = num_clks;
395405

drivers/clk/qcom/common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ struct qcom_cc_driver_data {
3030
size_t num_alpha_plls;
3131
u32 *clk_cbcrs;
3232
size_t num_clk_cbcrs;
33+
const struct clk_rcg_dfs_data *dfs_rcgs;
34+
size_t num_dfs_rcgs;
3335
void (*clk_regs_configure)(struct device *dev, struct regmap *regmap);
3436
};
3537

0 commit comments

Comments
 (0)