From: Bjorn Andersson Date: Sat, 4 May 2019 00:17:36 +0000 (-0700) Subject: clk: qcom: gdsc: WARN when failing to toggle X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f02fba3aa8feeee0a9f9c82c6db2ae9dda7825cd;p=linux.git clk: qcom: gdsc: WARN when failing to toggle 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 takes to debug this. Signed-off-by: Bjorn Andersson Reviewed-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Reviewed-by: Marc Gonzalez Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c index dd63aa36b0921..6a8a4996dde3b 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)