linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent
@ 2020-01-03 11:14 Niklas Cassel
  2020-01-03 19:15 ` Bjorn Andersson
  2020-01-05  7:16 ` Stephen Boyd
  0 siblings, 2 replies; 4+ messages in thread
From: Niklas Cassel @ 2020-01-03 11:14 UTC (permalink / raw)
  To: sboyd, bjorn.andersson; +Cc: mturquette, linux-arm-msm, linux-clk

From: Niklas Cassel <niklas.cassel@linaro.org>

Allow accessing the parent clock names required for the driver operation
by using the device tree 'clock-names' property, while falling back to
the previous method of using names in the global name space.

This permits extending the driver to other platforms without having to
modify its source code.

Co-developed-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
---
Changes since v3:
-Don't set dev->of_node explicitly, since the clock framework will now
automatically use the parent node pointer when needed.

Requires the following patch to the clock framework to land first:
https://patchwork.kernel.org/patch/11313639/

 drivers/clk/qcom/apcs-msm8916.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/qcom/apcs-msm8916.c b/drivers/clk/qcom/apcs-msm8916.c
index 46061b3d230e..cf69a97d0439 100644
--- a/drivers/clk/qcom/apcs-msm8916.c
+++ b/drivers/clk/qcom/apcs-msm8916.c
@@ -19,9 +19,9 @@
 
 static const u32 gpll0_a53cc_map[] = { 4, 5 };
 
-static const char * const gpll0_a53cc[] = {
-	"gpll0_vote",
-	"a53pll",
+static const struct clk_parent_data pdata[] = {
+	{ .fw_name = "aux", .name = "gpll0_vote", },
+	{ .fw_name = "pll", .name = "a53pll", },
 };
 
 /*
@@ -62,8 +62,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	init.name = "a53mux";
-	init.parent_names = gpll0_a53cc;
-	init.num_parents = ARRAY_SIZE(gpll0_a53cc);
+	init.parent_data = pdata;
+	init.num_parents = ARRAY_SIZE(pdata);
 	init.ops = &clk_regmap_mux_div_ops;
 	init.flags = CLK_SET_RATE_PARENT;
 
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent
  2020-01-03 11:14 [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent Niklas Cassel
@ 2020-01-03 19:15 ` Bjorn Andersson
  2020-01-05  7:16 ` Stephen Boyd
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2020-01-03 19:15 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: sboyd, mturquette, linux-arm-msm, linux-clk

On Fri 03 Jan 03:14 PST 2020, Niklas Cassel wrote:

> From: Niklas Cassel <niklas.cassel@linaro.org>
> 
> Allow accessing the parent clock names required for the driver operation
> by using the device tree 'clock-names' property, while falling back to
> the previous method of using names in the global name space.
> 
> This permits extending the driver to other platforms without having to
> modify its source code.
> 
> Co-developed-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>

Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> Changes since v3:
> -Don't set dev->of_node explicitly, since the clock framework will now
> automatically use the parent node pointer when needed.
> 
> Requires the following patch to the clock framework to land first:
> https://patchwork.kernel.org/patch/11313639/
> 
>  drivers/clk/qcom/apcs-msm8916.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/clk/qcom/apcs-msm8916.c b/drivers/clk/qcom/apcs-msm8916.c
> index 46061b3d230e..cf69a97d0439 100644
> --- a/drivers/clk/qcom/apcs-msm8916.c
> +++ b/drivers/clk/qcom/apcs-msm8916.c
> @@ -19,9 +19,9 @@
>  
>  static const u32 gpll0_a53cc_map[] = { 4, 5 };
>  
> -static const char * const gpll0_a53cc[] = {
> -	"gpll0_vote",
> -	"a53pll",
> +static const struct clk_parent_data pdata[] = {
> +	{ .fw_name = "aux", .name = "gpll0_vote", },
> +	{ .fw_name = "pll", .name = "a53pll", },
>  };
>  
>  /*
> @@ -62,8 +62,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	init.name = "a53mux";
> -	init.parent_names = gpll0_a53cc;
> -	init.num_parents = ARRAY_SIZE(gpll0_a53cc);
> +	init.parent_data = pdata;
> +	init.num_parents = ARRAY_SIZE(pdata);
>  	init.ops = &clk_regmap_mux_div_ops;
>  	init.flags = CLK_SET_RATE_PARENT;
>  
> -- 
> 2.24.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent
  2020-01-03 11:14 [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent Niklas Cassel
  2020-01-03 19:15 ` Bjorn Andersson
@ 2020-01-05  7:16 ` Stephen Boyd
  2020-01-07  7:28   ` Niklas Cassel
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2020-01-05  7:16 UTC (permalink / raw)
  To: Niklas Cassel, bjorn.andersson; +Cc: mturquette, linux-arm-msm, linux-clk

Quoting Niklas Cassel (2020-01-03 03:14:29)
> From: Niklas Cassel <niklas.cassel@linaro.org>
> 
> Allow accessing the parent clock names required for the driver operation
> by using the device tree 'clock-names' property, while falling back to
> the previous method of using names in the global name space.
> 
> This permits extending the driver to other platforms without having to
> modify its source code.
> 
> Co-developed-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
> ---

Applied to clk-next


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent
  2020-01-05  7:16 ` Stephen Boyd
@ 2020-01-07  7:28   ` Niklas Cassel
  0 siblings, 0 replies; 4+ messages in thread
From: Niklas Cassel @ 2020-01-07  7:28 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: bjorn.andersson, mturquette, linux-arm-msm, linux-clk

On Sat, Jan 04, 2020 at 11:16:19PM -0800, Stephen Boyd wrote:
> Quoting Niklas Cassel (2020-01-03 03:14:29)
> > From: Niklas Cassel <niklas.cassel@linaro.org>
> > 
> > Allow accessing the parent clock names required for the driver operation
> > by using the device tree 'clock-names' property, while falling back to
> > the previous method of using names in the global name space.
> > 
> > This permits extending the driver to other platforms without having to
> > modify its source code.
> > 
> > Co-developed-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> > Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
> > ---
> 
> Applied to clk-next
> 

Hello Stephen,

It has been 3 days, but I still can't find this in:
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/log/?h=clk-next

Did you perhaps forget to push your branch, or am I simply being to eager? :)

Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-07  7:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 11:14 [PATCH v4] clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent Niklas Cassel
2020-01-03 19:15 ` Bjorn Andersson
2020-01-05  7:16 ` Stephen Boyd
2020-01-07  7:28   ` Niklas Cassel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).