From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A538DC83004 for ; Wed, 29 Apr 2020 17:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83869208FE for ; Wed, 29 Apr 2020 17:23:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QOU1du+H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726955AbgD2RXx (ORCPT ); Wed, 29 Apr 2020 13:23:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726781AbgD2RXx (ORCPT ); Wed, 29 Apr 2020 13:23:53 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 614CEC035493 for ; Wed, 29 Apr 2020 10:23:53 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id x26so1316860pgc.10 for ; Wed, 29 Apr 2020 10:23:53 -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=8FQ5I0LPhVl6eGhASWpUBR6rw0WhPP4gGji6IhYEdAI=; b=QOU1du+HE3JgAOh4rUSq9U57cptJkja6ysGuZe3A2vHYbkftoM+sSoCIowLosbnnb/ xu/BvdUqRZev4Jwmb6Fm77ugbEMoCIGs7YDMZ1NkA51v4vQEUEkTKb+nNz+ttjmd+9oQ /C6ChCYBZFMZEbBDRcZVDF+Z8eCcAiOBdcjjSYgKML54CfOYIxwU74P5g95/9rYRJbJd 8BZ6V7q+tbxSdVctyZloz1iX/uTNh4lpIheO2VUsizG0glJkXN0Z0E1kTffGvIC4bgtl KMAelFQtpwayijR2u6M3SzMMZdxkqXGCyz6HOBEYPi0d8HZ1c6nII09f+xyYFk39JWBk SCNA== 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=8FQ5I0LPhVl6eGhASWpUBR6rw0WhPP4gGji6IhYEdAI=; b=c/6MF+9Al9B61fuUo7p9c2G1iBch05SIRD3I2rZHLY16Vr2A/i/QtRmUj3IXTUHPIV 6o7gQ1l3GysbQIeF6C0oqZETKIXpmamB+mofWU6JeXFQDF5ymVhzXi6bte9gwl/GLVxQ erQNx2QwZhyG5+NAXP7C7wf4tIJEUHNVzZyCATQmss/RpnGHcLH3C36wlmWhIEmH2d3v jS+QjKUah5P58je56eqYWEhbEdV9EPwxFwVLHZvu3+bYfXqWqTXtAVGvudLPwNY4ftyf yyGCDmZ7FyTuJ5GIAHP32BIyNVbexkRPsCXMp6FS+BBpSYzGx31GLOQKWoNjDp0q3GOY 62xw== X-Gm-Message-State: AGi0PuYCTdMLy13d3wDnjDYPM46V+j7MTpDfJlKPKpVk2yygGpjtNL53 HOyfTCl1SigIJ78v31bsNu+kw1TFcPw= X-Google-Smtp-Source: APiQypIw4v36udMuIWZcDFrQCZjgfjNurzviIuoAGQ7/1O3k+fz5uu5zvLh7g78WqTBtufAZneh1Bw== X-Received: by 2002:a63:4d11:: with SMTP id a17mr32571000pgb.392.1588181032618; Wed, 29 Apr 2020 10:23:52 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y21sm1451523pfn.148.2020.04.29.10.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 10:23:51 -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: [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work" Date: Wed, 29 Apr 2020 17:23:49 +0000 Message-Id: <20200429172349.55979-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 This reverts commit dca0b44957e5 ("regulator: Use driver_deferred_probe_timeout for regulator_init_complete_work"), as we ended up reverting the default deferred_probe_timeout value back to zero, to preserve behavior with 5.6 we need to decouple the regulator timeout which was previously 30 seconds. This avoids breaking some systems that depend on the regulator timeout but don't require the deferred probe timeout. 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 Reported-by: Marek Szyprowski Suggested-by: Mark Brown Signed-off-by: John Stultz --- drivers/regulator/core.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c340505150b6..7486f6e4e613 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5754,10 +5754,6 @@ static DECLARE_DELAYED_WORK(regulator_init_complete_work, static int __init regulator_init_complete(void) { - int delay = driver_deferred_probe_timeout; - - if (delay < 0) - delay = 0; /* * Since DT doesn't provide an idiomatic mechanism for * enabling full constraints and since it's much more natural @@ -5768,17 +5764,18 @@ static int __init regulator_init_complete(void) has_full_constraints = true; /* - * If driver_deferred_probe_timeout is set, we punt - * completion for that many seconds since systems like - * distros will load many drivers from userspace so consumers - * might not always be ready yet, this is particularly an - * issue with laptops where this might bounce the display off - * then on. Ideally we'd get a notification from userspace - * when this happens but we don't so just wait a bit and hope - * we waited long enough. It'd be better if we'd only do - * this on systems that need it. + * We punt completion for an arbitrary amount of time since + * systems like distros will load many drivers from userspace + * so consumers might not always be ready yet, this is + * particularly an issue with laptops where this might bounce + * the display off then on. Ideally we'd get a notification + * from userspace when this happens but we don't so just wait + * a bit and hope we waited long enough. It'd be better if + * we'd only do this on systems that need it, and a kernel + * command line option might be useful. */ - schedule_delayed_work(®ulator_init_complete_work, delay * HZ); + schedule_delayed_work(®ulator_init_complete_work, + msecs_to_jiffies(30000)); return 0; } -- 2.17.1