lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 5/5] clk: qcom: apcs-msm8916: get parent clock names from DT
Date
Quoting Jorge Ramirez-Ortiz (2019-09-12 07:15:34)
> @@ -61,6 +62,9 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
> if (!a53cc)
> return -ENOMEM;
>
> + if (of_clk_parent_fill(parent->of_node, parents, 2) == 2)
> + memcpy(gpll0_a53cc, parents, sizeof(parents));
> +
> init.name = "a53mux";
> init.parent_names = gpll0_a53cc;
> init.num_parents = ARRAY_SIZE(gpll0_a53cc);

Why can't we use new way of specifying parents in this driver too?

> @@ -76,10 +80,11 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
> a53cc->src_shift = 8;
> a53cc->parent_map = gpll0_a53cc_map;
>
> - a53cc->pclk = devm_clk_get(parent, NULL);
> + a53cc->pclk = of_clk_get(parent->of_node, 0);

And then leave this one alone? clk_get() with a NULL id should use a DT
index of 0 from what I can tell.

> if (IS_ERR(a53cc->pclk)) {
> ret = PTR_ERR(a53cc->pclk);
> - dev_err(dev, "failed to get clk: %d\n", ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(dev, "failed to get clk: %d\n", ret);
> return ret;
> }
>

\
 
 \ /
  Last update: 2019-11-07 23:20    [W:0.319 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site