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: 10929485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A67361395 for ; Sat, 4 May 2019 00:17:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88CBC287C6 for ; Sat, 4 May 2019 00:17:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79AFF287C8; Sat, 4 May 2019 00:17:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25C66287C2 for ; Sat, 4 May 2019 00:17:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726150AbfEDARl (ORCPT ); Fri, 3 May 2019 20:17:41 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32950 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbfEDARl (ORCPT ); Fri, 3 May 2019 20:17:41 -0400 Received: by mail-pg1-f194.google.com with SMTP id k19so3492301pgh.0 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=LKMFriD3n6/aGMzRbdJ/vmJ9QwoxPzz+IQ6HmUV8z+17XMUDaYyDchLXxLVVPvweNi 2aUkiMi65UKBf9OM5S/4oiA8X3T60kJkXkHeQuehBbgYRrNBa2WoZFcGv6Ja2gBAupK+ d31LWqIgb1Bw6D10YS048uGdiVJdvRsaoNb6ExZ7dANbzclhqmhXhIjgYH1jUG0EHapI 1JZeF9O/6uy7Fb1JINkPSicNIe6pVdDcTTX6QdKryvn3A+ip4CGY+j0zld8Cr0U8WQKR +leMIaYCFyjxCz7aM70dV7dZfN+jDYEa8CQSx3fsK3iwPdLA/V/JL7KTaZn6VVuyZDXA LADQ== X-Gm-Message-State: APjAAAVz7W1wFn0nNyxCnWCfWpRybOsP32xAP+MlGscif9Xj69ZvykE0 qKvoVC0gQJp1jERSZMHwl6eu3ovQkLE= X-Google-Smtp-Source: APXvYqyEjLXIJyLHnBMCT+wiJSfzdTRGABuxSLtEAXX8MsYrKBxK/Ma8r1oNRsXOlNMqaMEy5XECgw== 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Reviewed-by: Marc Gonzalez --- 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)