All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] clk: rockchip: check grf when waiting pll lock
Date: Mon, 15 Feb 2016 22:40:18 +0100	[thread overview]
Message-ID: <1835816.QSOU3ZhEch@phil> (raw)
In-Reply-To: <1455507205-12996-1-git-send-email-shawn.lin@rock-chips.com>

Am Montag, 15. Februar 2016, 11:33:25 schrieb Shawn Lin:
> rockchip_clk_get_grf pass on return value from
> syscon_regmap_lookup_by_phandle, so we check grf to
> make sure whether to do the following things or not.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

applied to my clk-branch for 4.6 with one change below

> ---
> 
>  drivers/clk/rockchip/clk-pll.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/rockchip/clk-pll.c
> b/drivers/clk/rockchip/clk-pll.c index b7e66c9..dddbc29 100644
> --- a/drivers/clk/rockchip/clk-pll.c
> +++ b/drivers/clk/rockchip/clk-pll.c
> @@ -90,10 +90,16 @@ static long rockchip_pll_round_rate(struct clk_hw *hw,
> */
>  static int rockchip_pll_wait_lock(struct rockchip_clk_pll *pll)
>  {
> -	struct regmap *grf = rockchip_clk_get_grf();
> +	struct regmap *grf;
>  	unsigned int val;
>  	int delay = 24000000, ret;
> 
> +	grf = rockchip_clk_get_grf();
> +	if (IS_ERR(grf)) {
> +		pr_err("%s: grf regmap not available\n", __func__);
> +		return -ENODEV;

I've changed that to PTR_ERR(grf), similar to the preexisting checks


Heiko

  reply	other threads:[~2016-02-15 21:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  3:32 [PATCH 0/6] Some trivial fixes for rockchip clk/pm stuff Shawn Lin
2016-02-15  3:33 ` [PATCH 1/6] clk: rockchip: handle alt_parent in err cases when registering cpuclk Shawn Lin
2016-02-15 21:39   ` Heiko Stuebner
2016-02-15  3:33 ` [PATCH 2/6] clk: rockchip: check grf when waiting pll lock Shawn Lin
2016-02-15 21:40   ` Heiko Stuebner [this message]
2016-02-15  3:33 ` [PATCH 3/6] clk: rockchip: don't return NULL when registering inverter fails Shawn Lin
2016-02-15 22:41   ` Heiko Stuebner
2016-02-15  3:33 ` [PATCH 4/6] clk: rockchip: don't return NULL when registering mmc branch fails Shawn Lin
2016-02-15 22:42   ` Heiko Stuebner
2016-02-15  3:33 ` [PATCH 5/6] clk: rockchip: fix coding style for clk-cpu.c Shawn Lin
2016-02-15 22:42   ` Heiko Stuebner
2016-02-15  3:33 ` [PATCH 6/6] soc: rockchip: power-domain: check the existing of regmap Shawn Lin
2016-02-15 21:26   ` Heiko Stuebner

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=1835816.QSOU3ZhEch@phil \
    --to=heiko@sntech.de \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=shawn.lin@rock-chips.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.