summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/gcc-sdm660.c
diff options
context:
space:
mode:
authorJeffrey Hugo <jhugo@codeaurora.org>2019-02-10 21:14:05 +0100
committerStephen Boyd <sboyd@kernel.org>2019-02-22 09:06:57 +0100
commit760be6586fbcc0a5a3b7892e3fe664a3f0530631 (patch)
tree6e330602aec0469fd930a8baf48e946e565030eb /drivers/clk/qcom/gcc-sdm660.c
parentclk: qcom: smd: Add support for MSM8998 rpm clocks (diff)
downloadlinux-760be6586fbcc0a5a3b7892e3fe664a3f0530631.tar.xz
linux-760be6586fbcc0a5a3b7892e3fe664a3f0530631.zip
clk: qcom: Make common clk_hw registrations
Several clock controller drivers define a list of clk_hw devices, and then register those devices in probe() before using common code to process the rest of initialization. Extend the common code to accept a list of clk_hw devices to process, thus eliminating many duplicate implementations. Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> Suggested-by: Stephen Boyd <sboyd@kernel.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Tested-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/gcc-sdm660.c')
-rw-r--r--drivers/clk/qcom/gcc-sdm660.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/clk/qcom/gcc-sdm660.c b/drivers/clk/qcom/gcc-sdm660.c
index ba239ea4c842..8827db23066f 100644
--- a/drivers/clk/qcom/gcc-sdm660.c
+++ b/drivers/clk/qcom/gcc-sdm660.c
@@ -2420,6 +2420,8 @@ static const struct qcom_cc_desc gcc_sdm660_desc = {
.num_resets = ARRAY_SIZE(gcc_sdm660_resets),
.gdscs = gcc_sdm660_gdscs,
.num_gdscs = ARRAY_SIZE(gcc_sdm660_gdscs),
+ .clk_hws = gcc_sdm660_hws,
+ .num_clk_hws = ARRAY_SIZE(gcc_sdm660_hws),
};
static const struct of_device_id gcc_sdm660_match_table[] = {
@@ -2431,7 +2433,7 @@ MODULE_DEVICE_TABLE(of, gcc_sdm660_match_table);
static int gcc_sdm660_probe(struct platform_device *pdev)
{
- int i, ret;
+ int ret;
struct regmap *regmap;
regmap = qcom_cc_map(pdev, &gcc_sdm660_desc);
@@ -2446,13 +2448,6 @@ static int gcc_sdm660_probe(struct platform_device *pdev)
if (ret)
return ret;
- /* Register the hws */
- for (i = 0; i < ARRAY_SIZE(gcc_sdm660_hws); i++) {
- ret = devm_clk_hw_register(&pdev->dev, gcc_sdm660_hws[i]);
- if (ret)
- return ret;
- }
-
return qcom_cc_really_probe(pdev, &gcc_sdm660_desc, regmap);
}