Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2755182pxa; Fri, 7 Aug 2020 21:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWfJSbus/HIE0CTaORXfx6ycAE8NDYPn54MqxvHiPfHX5PWvVAtUkUByV01EN8cw80IMfm X-Received: by 2002:aa7:d84d:: with SMTP id f13mr11399807eds.155.1596861411551; Fri, 07 Aug 2020 21:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596861411; cv=none; d=google.com; s=arc-20160816; b=Zi4qJJI01gmR2eChAWzg/ARaDEYDSgOwxRim9senni4dCDUOYwp8Tk6+i0OdkCBzEw RgZVY4Wp4SNzjKU+bqiXEI3WzrJ5nzHmGZYfia68Fj+5BD/lkRuHLuE3g/lKcfhQSUtq JtQLHKdvoiThfa2HMFsTjc4JwaAyiLjSo3EjxRIsBtj/FJ4kgAOe7D/8jtUobxy188VO q91RuxYS1rppZfNUu7N84J/BSbtuG1y094rxNwmBnVsbmgJW0fbfBCbpmRfdvK45SLwr 2LHdSbD+XvT5MmMGPTrhHSP1ACE8gszsp5FKXtgK7M7niwehw0hDiYccz3zcPJy4PXp5 IDVQ== 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=FLH00sdB350zJ9xfj23oogVpb2S3tQu3JW6EcRNgLew=; b=IS2WYoDNNtwNZAg1vNfqpp/Hf7gBFvl1itUiEnHX5YgcyLP0KPCDfrzV0i+r2f3tJG 1Eh72B6bZOM5eSSKHeB47olVJ8o5JJHY19/M+2Qo5AKUuF4+Xq6F3hboiZseaUX0ZoSg HbFuz/kJDfGl+LKsH85nVFcecsV6B28HOaawPWoWmsKaVplmNtdYxO2s13SmaT9lwga+ L8zsVX1KPRdWlUVNc4yyDOg9uS0/ow+kIwW1CnnwoHCF9Cw6KSvg/KASJITC0Pbgihxw 8dIM5tcOvXxyezeD/9HeUBjqibmP1qGa59eTz1t/NPHa8vTeg7ecfJy5ffU4ZaPBpew2 T1tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jxsmsVrP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id fi14si6673621ejb.628.2020.08.07.21.36.28; Fri, 07 Aug 2020 21:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jxsmsVrP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726202AbgHHEfR (ORCPT + 99 others); Sat, 8 Aug 2020 00:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbgHHEfQ (ORCPT ); Sat, 8 Aug 2020 00:35:16 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF7EDC061756 for ; Fri, 7 Aug 2020 21:35:16 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id 74so2200274pfx.13 for ; Fri, 07 Aug 2020 21:35:16 -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=FLH00sdB350zJ9xfj23oogVpb2S3tQu3JW6EcRNgLew=; b=jxsmsVrPMXk3ia55RuurLWnSF4l/zKLQ3vl9KAAZyocpecHvuHBmvqNZ3/XplYR3Gu n64wEa8PfUTVNoNBErV1lJqro5vuj1nM156YV6puxX0VwIGA00GjYcltZ/n0CHtTmuzl K2dCPiCPxd74wNDhXQLkKGBo2IVHvYaeYFNG01vgjfXIz8zc4ApEPfoR14VwkWPo/3jX gsEkm2oobSufzAL5Borf0uY3W1ZJuoPEjN+7yEoaVyebCPQbU6AoPggfRtKb3JqQ42/A JwqVVpbzfnkJNscvxEW48HhBsrwYsNzeGeVgzqGq0KhbSns0HdL3r9jTSBsMGRJ+8XlJ 8GKg== 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=FLH00sdB350zJ9xfj23oogVpb2S3tQu3JW6EcRNgLew=; b=S3WcMve6iOruyNuglF4mF9rSX2APaodbfrvoznbUgOs4v04wunmXXvsa4+BxulHv3o v12QypdnrQv9wRrMr8E3pm/HwV/oxhfxBXRl8YyckDeB/Wojoa3De3ZM1bv8wZEV5OzQ 7iSNlI1KBuaEAR4jHU60TFZlsOmc4rT/Nsjz9eiu7xLh1U3w5fRIPXJdx89xokb3G9KW vFw2YSn8DAOZhDY7afqfua9fl1vwI15qUl92QC8YkLeFw6Pl9FxWQWjUviG1rNL2K3eP kDBA3WStDhGxgtAWH97J/GJTR7piIO8M7su0X3Tfn7Mrir0BORlOUM1G00pigXwLt5DC WvLg== X-Gm-Message-State: AOAM530G+ykW/Yl+Qo771psK1MFjw9spKmOVKgjLuoAo7D7kenLveYzy sBZCHMO/gVKi+m8qgoRa1BNYD4wTlOk= X-Received: by 2002:a63:485f:: with SMTP id x31mr14308176pgk.49.1596861315980; Fri, 07 Aug 2020 21:35:15 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id u24sm14607963pfm.211.2020.08.07.21.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 21:35:15 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , linux-pm@vger.kernel.org, Greg Kroah-Hartman , Linus Walleij , Thierry Reding , Mark Brown , Liam Girdwood , Bjorn Andersson , Saravana Kannan , Todd Kjos , Len Brown , Pavel Machek , Ulf Hansson , Kevin Hilman , "Rafael J. Wysocki" , Rob Herring Subject: [RFC][PATCH] pinctrl: Rework driver_deferred_probe_check_state() evaluation since default timeout has changed Date: Sat, 8 Aug 2020 04:35:12 +0000 Message-Id: <20200808043512.106865-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit bec6c0ecb243 ("pinctrl: Remove use of driver_deferred_probe_check_state_continue()"), we removed the use of driver_deferred_probe_check_state_continue() which effectively never returned -ETIMED_OUT, with the driver_deferred_probe_check_state() function that had been reworked to properly return ETIMED_OUT when the deferred probe timeout expired. Along with that change, we set the default timeout to 30 seconds. However, since moving the timeout to 30 seconds caused some issues for some users with optional dt links, we set the default timeout back to zero - see commit ce68929f07de ("driver core: Revert default driver_deferred_probe_timeout value to 0") This in essence changed the behavior of the pinctrl's usage of driver_deferred_probe_check_state(), as it now would return ETIMED_OUT by default. Thierry reported this caused problems with resume on tegra platforms. Thus this patch tweaks the pinctrl logic so that it behaves as before. If modules are enabled, we'll only return EPROBE_DEFERRED while we're missing drivers linked in the DT. Cc: linux-pm@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Linus Walleij Cc: Thierry Reding Cc: Mark Brown Cc: Liam Girdwood Cc: Bjorn Andersson Cc: Saravana Kannan Cc: Todd Kjos Cc: Len Brown Cc: Pavel Machek Cc: Ulf Hansson Cc: Kevin Hilman Cc: "Rafael J. Wysocki" Cc: Rob Herring Fixes: bec6c0ecb243 ("pinctrl: Remove use of driver_deferred_probe_check_state_continue()") Fixes: ce68929f07de ("driver core: Revert default driver_deferred_probe_timeout value to 0") Reported-by: Thierry Reding Signed-off-by: John Stultz --- drivers/pinctrl/devicetree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index c6fe7d64c913..09ddf567ccb4 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicetree.c @@ -129,9 +129,8 @@ static int dt_to_map_one_config(struct pinctrl *p, if (!np_pctldev || of_node_is_root(np_pctldev)) { of_node_put(np_pctldev); ret = driver_deferred_probe_check_state(p->dev); - /* keep deferring if modules are enabled unless we've timed out */ - if (IS_ENABLED(CONFIG_MODULES) && !allow_default && - (ret == -ENODEV)) + /* keep deferring if modules are enabled */ + if (IS_ENABLED(CONFIG_MODULES) && !allow_default) ret = -EPROBE_DEFER; return ret; } -- 2.17.1