All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: of-simple: remove include of clk-provider.h
@ 2017-08-13 14:21 ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2017-08-13 14:21 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Stephen Boyd, linux-arm-kernel, linux-usb, linux-clk, Shawn Guo

From: Shawn Guo <shawn.guo@linaro.org>

The header clk-provider.h is there for clock drivers (providers) to
include, not client drivers (consumers).  That said,
of_clk_get_parent_count() is a helper function for clock providers, not
a clk API for consumers.

Let's replace of_clk_get_parent_count() with of_count_phandle_with_args()
call, so that we can remove the include of clk-provider.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/usb/dwc3/dwc3-of-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index fe414e7a9c78..4cef7d4f9cd0 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -25,7 +25,6 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
@@ -96,7 +95,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, simple);
 	simple->dev = dev;
 
-	ret = dwc3_of_simple_clk_init(simple, of_clk_get_parent_count(np));
+	ret = dwc3_of_simple_clk_init(simple, of_count_phandle_with_args(np,
+						"clocks", "#clock-cells"));
 	if (ret)
 		return ret;
 
-- 
1.9.1


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

* [PATCH] usb: dwc3: of-simple: remove include of clk-provider.h
@ 2017-08-13 14:21 ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2017-08-13 14:21 UTC (permalink / raw)
  To: linux-arm-kernel

From: Shawn Guo <shawn.guo@linaro.org>

The header clk-provider.h is there for clock drivers (providers) to
include, not client drivers (consumers).  That said,
of_clk_get_parent_count() is a helper function for clock providers, not
a clk API for consumers.

Let's replace of_clk_get_parent_count() with of_count_phandle_with_args()
call, so that we can remove the include of clk-provider.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/usb/dwc3/dwc3-of-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index fe414e7a9c78..4cef7d4f9cd0 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -25,7 +25,6 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
@@ -96,7 +95,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, simple);
 	simple->dev = dev;
 
-	ret = dwc3_of_simple_clk_init(simple, of_clk_get_parent_count(np));
+	ret = dwc3_of_simple_clk_init(simple, of_count_phandle_with_args(np,
+						"clocks", "#clock-cells"));
 	if (ret)
 		return ret;
 
-- 
1.9.1

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

* Re: [PATCH] usb: dwc3: of-simple: remove include of clk-provider.h
  2017-08-13 14:21 ` Shawn Guo
@ 2017-08-17 21:06   ` Stephen Boyd
  -1 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2017-08-17 21:06 UTC (permalink / raw)
  To: Shawn Guo; +Cc: Felipe Balbi, linux-arm-kernel, linux-usb, linux-clk, Shawn Guo

On 08/13, Shawn Guo wrote:
> From: Shawn Guo <shawn.guo@linaro.org>
> 
> The header clk-provider.h is there for clock drivers (providers) to
> include, not client drivers (consumers).  That said,
> of_clk_get_parent_count() is a helper function for clock providers, not
> a clk API for consumers.
> 
> Let's replace of_clk_get_parent_count() with of_count_phandle_with_args()
> call, so that we can remove the include of clk-provider.h.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* [PATCH] usb: dwc3: of-simple: remove include of clk-provider.h
@ 2017-08-17 21:06   ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2017-08-17 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/13, Shawn Guo wrote:
> From: Shawn Guo <shawn.guo@linaro.org>
> 
> The header clk-provider.h is there for clock drivers (providers) to
> include, not client drivers (consumers).  That said,
> of_clk_get_parent_count() is a helper function for clock providers, not
> a clk API for consumers.
> 
> Let's replace of_clk_get_parent_count() with of_count_phandle_with_args()
> call, so that we can remove the include of clk-provider.h.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

end of thread, other threads:[~2017-08-17 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-13 14:21 [PATCH] usb: dwc3: of-simple: remove include of clk-provider.h Shawn Guo
2017-08-13 14:21 ` Shawn Guo
2017-08-17 21:06 ` Stephen Boyd
2017-08-17 21:06   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.