From patchwork Sat May 4 00:17:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 163340 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp18521ill; Fri, 3 May 2019 17:17:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAP9cTNvsCcywaiCG3avSOECOK0REGB9cZm5hMiLl7FBO3snRgR7W1A+KFp8OaAqer2y/G X-Received: by 2002:a65:648c:: with SMTP id e12mr14421609pgv.346.1556929062851; Fri, 03 May 2019 17:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556929062; cv=none; d=google.com; s=arc-20160816; b=Mn2vOAdcGZwCwqkiAA32ieBJfb62ccYwPFtquGDi8B1gMKpZudpM4tNqJg+Jj3f0J+ 7l86SD+KOJ6YRuK8x0s0QBOQpOO/ydO0mmRm1rEfffeMwxsb4p0Qd7Sr5lpGaPxKqvib ebdr36dOyliOeEOjAjRyd6vKFBGZGlQ4IXwoPSsGwUoBNNeWbWM292P6/EkgUvOzjCDh 1+1l7wqQVZkP96r5tPQwXPXromof3cQXezyN7H9tTDO/OlxS7Z8KKTfATlTKplQId5Qi hhjumNTnIwV0Y/UXYnGt3jtpinHhpC+F9zifUvgU8YS+Y3V7Ch+T9CzWW0JWbXFLd8T+ A5fQ== 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=CVv3pwNdC0xMJR1GWDbdXbQT9/nxqV8EGuv6yrqfEJFgKKJLvx/w6qNv/f/qAZCy8M LG3UP+oJSM0KKrSuMQ8CF6QMF6Wpz5dg8HPqMDHck3HJyzydWvubo5NNpYD/8Zt2HNgd Aw8135cZ61+kAmhf7VDsTkXlTY+eAOkyqSf2WnYYN/LiY6tbqlxIqz8+lkD20OjJzNhZ Tn0ETNCYAKDYHeK1db0SK3DVHtXmZQcrRJnrkqjbace+9qbirz1xV+j6HGvFVPiXhqv+ qLQ4ztngvP9YDAIiBwcJvs7onraET0Wv8ax25yUump4/ZT40G20c5HCia8QGDPWeIpfw YaJw== 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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 d9si4343544pfr.189.2019.05.03.17.17.42; Fri, 03 May 2019 17:17:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1726042AbfEDARl (ORCPT + 15 others); Fri, 3 May 2019 20:17:41 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37177 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfEDARl (ORCPT ); Fri, 3 May 2019 20:17:41 -0400 Received: by mail-pg1-f194.google.com with SMTP id e6so3486360pgc.4 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=XccBXdPhuYKFq/5Nhs+v0k/qirKelZ+Ltr6yRrSsAXLMLQB1C2VMwE5PFytjOKqMgy R1HAbtUJFyIrvXVMYTFxIodQ/91z+qu2UNcu+zSV8PL6sqx3XHsr+seVBTqthuj59Ij2 cgMvuS9ivL7bh2WfbhZi2eClz7lFyXoKc8+ko7bSGqsNtT9t3CQaLkgPG8kc2FhzPCE6 l4RfINmvRrTqiovckbBzjBeLeVn2nX/0wRtX9qOPfNPJfye/spqpMXpn3ou7q7KFiPGF uFRmYUBVdgeaCyYnJniLWWwG0Wi1ZRarIXpHSkB+3LKFKYO0fHdMQLfDQyq5O7RwxZwa lx1w== X-Gm-Message-State: APjAAAXYIdJoMorPkON404RJpYEZXJuZVGKTx2cxmjFt4Kph3cbMONzQ n01khVKtVOEMHy31w++Peu/dPQ== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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(-) -- 2.18.0 Reviewed-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Reviewed-by: Marc Gonzalez 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)