Skip to content

Commit 2a15483

Browse files
johnstultz-workgregkh
authored andcommitted
regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work"
This reverts commit dca0b44 ("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: [email protected] Cc: Linus Walleij <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Saravana Kannan <[email protected]> Cc: Todd Kjos <[email protected]> Cc: Len Brown <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Rob Herring <[email protected]> Reported-by: Marek Szyprowski <[email protected]> Suggested-by: Mark Brown <[email protected]> Signed-off-by: John Stultz <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 35a6723 commit 2a15483

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

drivers/regulator/core.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5754,10 +5754,6 @@ static DECLARE_DELAYED_WORK(regulator_init_complete_work,
57545754

57555755
static int __init regulator_init_complete(void)
57565756
{
5757-
int delay = driver_deferred_probe_timeout;
5758-
5759-
if (delay < 0)
5760-
delay = 0;
57615757
/*
57625758
* Since DT doesn't provide an idiomatic mechanism for
57635759
* enabling full constraints and since it's much more natural
@@ -5768,17 +5764,18 @@ static int __init regulator_init_complete(void)
57685764
has_full_constraints = true;
57695765

57705766
/*
5771-
* If driver_deferred_probe_timeout is set, we punt
5772-
* completion for that many seconds since systems like
5773-
* distros will load many drivers from userspace so consumers
5774-
* might not always be ready yet, this is particularly an
5775-
* issue with laptops where this might bounce the display off
5776-
* then on. Ideally we'd get a notification from userspace
5777-
* when this happens but we don't so just wait a bit and hope
5778-
* we waited long enough. It'd be better if we'd only do
5779-
* this on systems that need it.
5767+
* We punt completion for an arbitrary amount of time since
5768+
* systems like distros will load many drivers from userspace
5769+
* so consumers might not always be ready yet, this is
5770+
* particularly an issue with laptops where this might bounce
5771+
* the display off then on. Ideally we'd get a notification
5772+
* from userspace when this happens but we don't so just wait
5773+
* a bit and hope we waited long enough. It'd be better if
5774+
* we'd only do this on systems that need it, and a kernel
5775+
* command line option might be useful.
57805776
*/
5781-
schedule_delayed_work(&regulator_init_complete_work, delay * HZ);
5777+
schedule_delayed_work(&regulator_init_complete_work,
5778+
msecs_to_jiffies(30000));
57825779

57835780
return 0;
57845781
}

0 commit comments

Comments
 (0)