clk: qcom: gdsc: WARN when failing to toggle
authorBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 4 May 2019 00:17:36 +0000 (17:17 -0700)
committerStephen Boyd <sboyd@kernel.org>
Fri, 7 Jun 2019 20:19:30 +0000 (13:19 -0700)
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 <bjorn.andersson@linaro.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/gdsc.c

index dd63aa36b092125e99748a0ebd2fe615d5d538fa..6a8a4996dde3baee5814d5223f8da0470a02ce2c 100644 (file)
@@ -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)