LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] pwm: rockchip: Use of_clk_get_parent_count()
@ 2019-05-25 11:59 Kefeng Wang
2019-05-27 13:55 ` [PATCH v2] " Kefeng Wang
0 siblings, 1 reply; 4+ messages in thread
From: Kefeng Wang @ 2019-05-25 11:59 UTC (permalink / raw)
To: Thierry Reding, Heiko Stuebner
Cc: linux-arm-kernel, linux-kernel, Kefeng Wang
Use of_clk_get_parent_count() instead of open coding.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
drivers/pwm/pwm-rockchip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 4d99d468df09..a0fbb9a139bd 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -329,8 +329,8 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
}
}
- count = of_count_phandle_with_args(pdev->dev.of_node,
- "clocks", "#clock-cells");
+ count = of_clk_get_parent_count(pdev->dev.of_node);
+
if (count == 2)
pc->pclk = devm_clk_get(&pdev->dev, "pclk");
else
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] pwm: rockchip: Use of_clk_get_parent_count()
2019-05-25 11:59 [PATCH] pwm: rockchip: Use of_clk_get_parent_count() Kefeng Wang
@ 2019-05-27 13:55 ` Kefeng Wang
2019-06-04 20:09 ` Heiko Stübner
2019-06-15 15:41 ` Heiko Stübner
0 siblings, 2 replies; 4+ messages in thread
From: Kefeng Wang @ 2019-05-27 13:55 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: Kefeng Wang, Thierry Reding, Heiko Stuebner
Use of_clk_get_parent_count() instead of open coding.
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
v2:
- add include <linux/of_clk.h>
drivers/pwm/pwm-rockchip.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 4d99d468df09..d8f23daca290 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -13,6 +13,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/of_clk.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
@@ -329,8 +330,8 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
}
}
- count = of_count_phandle_with_args(pdev->dev.of_node,
- "clocks", "#clock-cells");
+ count = of_clk_get_parent_count(pdev->dev.of_node);
+
if (count == 2)
pc->pclk = devm_clk_get(&pdev->dev, "pclk");
else
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] pwm: rockchip: Use of_clk_get_parent_count()
2019-05-27 13:55 ` [PATCH v2] " Kefeng Wang
@ 2019-06-04 20:09 ` Heiko Stübner
2019-06-15 15:41 ` Heiko Stübner
1 sibling, 0 replies; 4+ messages in thread
From: Heiko Stübner @ 2019-06-04 20:09 UTC (permalink / raw)
To: Kefeng Wang; +Cc: linux-arm-kernel, linux-kernel, Thierry Reding
Am Montag, 27. Mai 2019, 15:55:09 CEST schrieb Kefeng Wang:
> Use of_clk_get_parent_count() instead of open coding.
>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
on multiple rockchip boards with multiple pwm-regulator and -backlight
Tested-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] pwm: rockchip: Use of_clk_get_parent_count()
2019-05-27 13:55 ` [PATCH v2] " Kefeng Wang
2019-06-04 20:09 ` Heiko Stübner
@ 2019-06-15 15:41 ` Heiko Stübner
1 sibling, 0 replies; 4+ messages in thread
From: Heiko Stübner @ 2019-06-15 15:41 UTC (permalink / raw)
To: Kefeng Wang; +Cc: linux-arm-kernel, linux-kernel, Thierry Reding
Am Montag, 27. Mai 2019, 15:55:09 CEST schrieb Kefeng Wang:
> Use of_clk_get_parent_count() instead of open coding.
>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> ---
> v2:
> - add include <linux/of_clk.h>
> drivers/pwm/pwm-rockchip.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
> index 4d99d468df09..d8f23daca290 100644
> --- a/drivers/pwm/pwm-rockchip.c
> +++ b/drivers/pwm/pwm-rockchip.c
> @@ -13,6 +13,7 @@
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of.h>
> +#include <linux/of_clk.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/pwm.h>
> @@ -329,8 +330,8 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
> }
> }
>
> - count = of_count_phandle_with_args(pdev->dev.of_node,
> - "clocks", "#clock-cells");
> + count = of_clk_get_parent_count(pdev->dev.of_node);
> +
> if (count == 2)
> pc->pclk = devm_clk_get(&pdev->dev, "pclk");
> else
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-15 15:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 11:59 [PATCH] pwm: rockchip: Use of_clk_get_parent_count() Kefeng Wang
2019-05-27 13:55 ` [PATCH v2] " Kefeng Wang
2019-06-04 20:09 ` Heiko Stübner
2019-06-15 15:41 ` Heiko Stübner
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).