Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: msm8916: Move xo and sleep clocks into DT

Move the xo and sleep clocks to device-tree, instead of hard-coding
them in the driver. This allows us to insert the RPM clocks (if they
are enabled) in between the on-board oscillators and the actual clock.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Georgi Djakov and committed by
Stephen Boyd
cf81a1cf d687767a

+7 -9
+7 -9
drivers/clk/qcom/gcc-msm8916.c
··· 3357 3357 3358 3358 static int gcc_msm8916_probe(struct platform_device *pdev) 3359 3359 { 3360 - struct clk *clk; 3360 + int ret; 3361 3361 struct device *dev = &pdev->dev; 3362 3362 3363 - /* Temporary until RPM clocks supported */ 3364 - clk = clk_register_fixed_rate(dev, "xo", NULL, CLK_IS_ROOT, 19200000); 3365 - if (IS_ERR(clk)) 3366 - return PTR_ERR(clk); 3363 + ret = qcom_cc_register_board_clk(dev, "xo_board", "xo", 19200000); 3364 + if (ret) 3365 + return ret; 3367 3366 3368 - clk = clk_register_fixed_rate(dev, "sleep_clk_src", NULL, 3369 - CLK_IS_ROOT, 32768); 3370 - if (IS_ERR(clk)) 3371 - return PTR_ERR(clk); 3367 + ret = qcom_cc_register_sleep_clk(dev); 3368 + if (ret) 3369 + return ret; 3372 3370 3373 3371 return qcom_cc_probe(pdev, &gcc_msm8916_desc); 3374 3372 }