Commit 2a15483b authored by John Stultz's avatar John Stultz Committed by Greg Kroah-Hartman

regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work"

This reverts commit dca0b449 ("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: Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Todd Kjos <tkjos@google.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Rob Herring <robh@kernel.org>
Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Suggested-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200429172349.55979-1-john.stultz@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 35a67236
...@@ -5754,10 +5754,6 @@ static DECLARE_DELAYED_WORK(regulator_init_complete_work, ...@@ -5754,10 +5754,6 @@ static DECLARE_DELAYED_WORK(regulator_init_complete_work,
static int __init regulator_init_complete(void) 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 * Since DT doesn't provide an idiomatic mechanism for
* enabling full constraints and since it's much more natural * enabling full constraints and since it's much more natural
...@@ -5768,17 +5764,18 @@ static int __init regulator_init_complete(void) ...@@ -5768,17 +5764,18 @@ static int __init regulator_init_complete(void)
has_full_constraints = true; has_full_constraints = true;
/* /*
* If driver_deferred_probe_timeout is set, we punt * We punt completion for an arbitrary amount of time since
* completion for that many seconds since systems like * systems like distros will load many drivers from userspace
* distros will load many drivers from userspace so consumers * so consumers might not always be ready yet, this is
* might not always be ready yet, this is particularly an * particularly an issue with laptops where this might bounce
* issue with laptops where this might bounce the display off * the display off then on. Ideally we'd get a notification
* then on. Ideally we'd get a notification from userspace * from userspace when this happens but we don't so just wait
* when this happens but we don't so just wait a bit and hope * a bit and hope we waited long enough. It'd be better if
* we waited long enough. It'd be better if we'd only do * we'd only do this on systems that need it, and a kernel
* this on systems that need it. * command line option might be useful.
*/ */
schedule_delayed_work(&regulator_init_complete_work, delay * HZ); schedule_delayed_work(&regulator_init_complete_work,
msecs_to_jiffies(30000));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment