All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] pwm: rockchip: Use of_clk_get_parent_count()
Date: Sat, 15 Jun 2019 17:41:10 +0200	[thread overview]
Message-ID: <5458953.i9kcuLIT7L@diego> (raw)
In-Reply-To: <20190527135509.184544-1-wangkefeng.wang@huawei.com>

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
> 





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Thierry Reding <thierry.reding@gmail.com>
Subject: Re: [PATCH v2] pwm: rockchip: Use of_clk_get_parent_count()
Date: Sat, 15 Jun 2019 17:41:10 +0200	[thread overview]
Message-ID: <5458953.i9kcuLIT7L@diego> (raw)
In-Reply-To: <20190527135509.184544-1-wangkefeng.wang@huawei.com>

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
> 





  parent reply	other threads:[~2019-06-15 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25 11:59 [PATCH] pwm: rockchip: Use of_clk_get_parent_count() Kefeng Wang
2019-05-25 11:59 ` Kefeng Wang
2019-05-27 13:55 ` [PATCH v2] " Kefeng Wang
2019-05-27 13:55   ` Kefeng Wang
2019-06-04 20:09   ` Heiko Stübner
2019-06-04 20:09     ` Heiko Stübner
2019-06-15 15:41   ` Heiko Stübner [this message]
2019-06-15 15:41     ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5458953.i9kcuLIT7L@diego \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.