linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: gdsc: WARN when failing to toggle
@ 2019-05-04  0:17 Bjorn Andersson
  2019-05-17 19:16 ` Jeffrey Hugo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bjorn Andersson @ 2019-05-04  0:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-arm-msm, linux-clk, linux-kernel

Failing to toggle a GDSC as the driver core is attaching the
power-domain to a device will cause a silent probe deferral. Provide an
explicit warning to the developer, in order to reduce the amount of time
it take to debug this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/clk/qcom/gdsc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
index dd63aa36b092..6a8a4996dde3 100644
--- a/drivers/clk/qcom/gdsc.c
+++ b/drivers/clk/qcom/gdsc.c
@@ -149,7 +149,9 @@ static int gdsc_toggle_logic(struct gdsc *sc, enum gdsc_status status)
 		udelay(1);
 	}
 
-	return gdsc_poll_status(sc, status);
+	ret = gdsc_poll_status(sc, status);
+	WARN(ret, "%s status stuck at 'o%s'", sc->pd.name, status ? "ff" : "n");
+	return ret;
 }
 
 static inline int gdsc_deassert_reset(struct gdsc *sc)
-- 
2.18.0


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

* Re: [PATCH] clk: qcom: gdsc: WARN when failing to toggle
  2019-05-04  0:17 [PATCH] clk: qcom: gdsc: WARN when failing to toggle Bjorn Andersson
@ 2019-05-17 19:16 ` Jeffrey Hugo
  2019-05-20  8:14 ` Marc Gonzalez
  2019-06-07 20:20 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Jeffrey Hugo @ 2019-05-17 19:16 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd
  Cc: linux-arm-msm, linux-clk, linux-kernel

On 5/3/2019 6:17 PM, Bjorn Andersson wrote:
> Failing to toggle a GDSC as the driver core is attaching the
> power-domain to a device will cause a silent probe deferral. Provide an
> explicit warning to the developer, in order to reduce the amount of time
> it take to debug this.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>

> ---
>   drivers/clk/qcom/gdsc.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> index dd63aa36b092..6a8a4996dde3 100644
> --- a/drivers/clk/qcom/gdsc.c
> +++ b/drivers/clk/qcom/gdsc.c
> @@ -149,7 +149,9 @@ static int gdsc_toggle_logic(struct gdsc *sc, enum gdsc_status status)
>   		udelay(1);
>   	}
>   
> -	return gdsc_poll_status(sc, status);
> +	ret = gdsc_poll_status(sc, status);
> +	WARN(ret, "%s status stuck at 'o%s'", sc->pd.name, status ? "ff" : "n");
> +	return ret;
>   }
>   
>   static inline int gdsc_deassert_reset(struct gdsc *sc)
> 


-- 
Jeffrey Hugo
Qualcomm Datacenter Technologies as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

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

* Re: [PATCH] clk: qcom: gdsc: WARN when failing to toggle
  2019-05-04  0:17 [PATCH] clk: qcom: gdsc: WARN when failing to toggle Bjorn Andersson
  2019-05-17 19:16 ` Jeffrey Hugo
@ 2019-05-20  8:14 ` Marc Gonzalez
  2019-06-07 20:20 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Marc Gonzalez @ 2019-05-20  8:14 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd; +Cc: MSM, linux-clk, LKML

On 04/05/2019 02:17, Bjorn Andersson wrote:

> Failing to toggle a GDSC as the driver core is attaching the
> power-domain to a device will cause a silent probe deferral. Provide an
> explicit warning to the developer, in order to reduce the amount of time
> it take to debug this.

"it takes"

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  drivers/clk/qcom/gdsc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> index dd63aa36b092..6a8a4996dde3 100644
> --- a/drivers/clk/qcom/gdsc.c
> +++ b/drivers/clk/qcom/gdsc.c
> @@ -149,7 +149,9 @@ static int gdsc_toggle_logic(struct gdsc *sc, enum gdsc_status status)
>  		udelay(1);
>  	}
>  
> -	return gdsc_poll_status(sc, status);
> +	ret = gdsc_poll_status(sc, status);
> +	WARN(ret, "%s status stuck at 'o%s'", sc->pd.name, status ? "ff" : "n");
> +	return ret;

In my opinion, the minor obfuscation of "o%s", foo ? "ff" : "n"
does not justify the tiny space savings.

I'd spell it out: "%s", foo ? "off" : "on"

In any event:

Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr>

Regards.

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

* Re: [PATCH] clk: qcom: gdsc: WARN when failing to toggle
  2019-05-04  0:17 [PATCH] clk: qcom: gdsc: WARN when failing to toggle Bjorn Andersson
  2019-05-17 19:16 ` Jeffrey Hugo
  2019-05-20  8:14 ` Marc Gonzalez
@ 2019-06-07 20:20 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2019-06-07 20:20 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette; +Cc: linux-arm-msm, linux-clk, linux-kernel

Quoting Bjorn Andersson (2019-05-03 17:17:36)
> Failing to toggle a GDSC as the driver core is attaching the
> power-domain to a device will cause a silent probe deferral. Provide an
> explicit warning to the developer, in order to reduce the amount of time
> it take to debug this.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---

Applied to clk-next


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

end of thread, other threads:[~2019-06-07 20:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-04  0:17 [PATCH] clk: qcom: gdsc: WARN when failing to toggle Bjorn Andersson
2019-05-17 19:16 ` Jeffrey Hugo
2019-05-20  8:14 ` Marc Gonzalez
2019-06-07 20:20 ` Stephen Boyd

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).