Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1144093yba; Fri, 3 May 2019 17:18:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjhkVePiH4sr1WWdSU47rHMBliL9O+ogZwGbL6aXB4AF+BSq6xDFIMmY4HZETOB8qFmZHu X-Received: by 2002:a62:4690:: with SMTP id o16mr15040717pfi.166.1556929129048; Fri, 03 May 2019 17:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556929129; cv=none; d=google.com; s=arc-20160816; b=1FtWgrIhsxoGRqymIoPXeN9USDNSJjilQUmVXxoevkhM86CQh41H1x+nBzqK4awldo 6U+I90QWynQ/F5KbRfwulL8OnE/+5/iDUEvLOSY4gR47UDxR332BRWJLk77SHitA6KgD VcFmVDxUgNEPVW3b5N6wXeosmm4mN0lPivVbnS+crIhymgmGITTxM6NvWtXHFrRzOt4O +mfvbr58fPxYweI7fJ+KzoywN1ZO5GjS/qxd0wzc5kbZ6TKae8j1uy3+hkFhAzANijZ4 OWpuX7fMMKaLADR+c0lVd1/bn0N3HoHRbsxr8A6Dt6ujxdatY8lU+O4u3MxEdC7rU0Ae T/Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=T0GFsU5iTOyCwj8QNb5BtH0GpMGDHOczgY1Uj/CZHXk=; b=TQeBGbpBQ8Bm11iFAUXf2FZDB3ggb9ZUkyj2qq21IsH8Dh4bY0rPZV7zYTKm1Awb7L T3GsQDPR4l5lI221ajpK4prb9ZPi6sA5U77vaNfZ07R5PF2iMQa4f6oPkD7vAEtOjXcP HAcBFE9VfS2aju9S/908VKvJ4KSY86ZpwAUlm6fWXYYLfitgxUaZVS1ZVn98fYnXG7ew jOHTV7LHJiaaADAW6bzXoz/PkwpFWAmQGjxlW35OPe5taqyvtArisfdBw8bbaAOXR/GO KzdDd2y5tyvAcfYLfrpAEnLONaGCp9Rrvi9sb6fxB8NskhGC/qx/at9gEPemrAUfRFA5 axkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oeQsoIXn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t21si4418873plr.366.2019.05.03.17.18.31; Fri, 03 May 2019 17:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oeQsoIXn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726432AbfEDARl (ORCPT + 99 others); Fri, 3 May 2019 20:17:41 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43308 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbfEDARl (ORCPT ); Fri, 3 May 2019 20:17:41 -0400 Received: by mail-pf1-f195.google.com with SMTP id e67so3671221pfe.10 for ; Fri, 03 May 2019 17:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=T0GFsU5iTOyCwj8QNb5BtH0GpMGDHOczgY1Uj/CZHXk=; b=oeQsoIXnKAJoKnIszLlOgMj6J9duncW8mzUEey2yO4oNzCVnmVL0XX+8v9FM5pIy2s lj2aO3Aoo+Ij4241jr1fnMBi8z2hYk1KgQr7A2eOY8hTzfApsR4JhFNawomFUYNI1rzI 8kKJt+eaMdWlosvTyjoMnPmu5jUASwgPiJ2D49QPZe5GVpAGEHSdgtJ2pp0tvNrK8/nP YD0IxCHRQojMDUkPcZQrUq/fYJcRrENPVAf7wOFaRMVYXyqZsqNu2kP0a1NL/B9+izSu WMuD+dGAQClX7s8+hSZr27NH9SDNlHuoEMnsc31/PEFQyzW5OUmzcrzHkI6/MnOawgA/ VMVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=T0GFsU5iTOyCwj8QNb5BtH0GpMGDHOczgY1Uj/CZHXk=; b=TQpbt3/aFfk5bsz/WKk5FtbwjUWOpws/a5HyC67N8mCrLhThzR7/o1Tc2jTP38VIJ3 DPVTL70S7/CH5TmCgM/CHmK/xsQ4cXYO2RYw0IYC0uXwBJ93WmlrXjteY96HZBEcZORD JZX84Bcxz/Qth14yec3olBAZ1xa+uaZhEmB1M/WNQt3RiyZ500JprFbIhAbFHyJWAOaj GVhGVSMTb0eIa4WAHm5zLULj1BgyCvSxXwEwm8VoC1mbtp/bRaSHlR5CZEcmY1BYC8Pn AP+5jwgB/1809R/BTV75FNzsIvGSP2gdwfaXf44xNrDZWi+ful7Yu3f8tRmlZNGF6DR3 l3aw== X-Gm-Message-State: APjAAAUFAaIGCs51cSkdRegBxPdU9XvvmvP2ohAiXmoywNekW1Yn9+oF li5JVyUGOvclg5uBioDzaYCZ5A== X-Received: by 2002:a62:4690:: with SMTP id o16mr15035772pfi.166.1556929060198; Fri, 03 May 2019 17:17:40 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 144sm4364785pfy.49.2019.05.03.17.17.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 17:17:38 -0700 (PDT) From: Bjorn Andersson To: Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: qcom: gdsc: WARN when failing to toggle Date: Fri, 3 May 2019 17:17:36 -0700 Message-Id: <20190504001736.8598-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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