* [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work"
@ 2020-04-29 17:23 John Stultz
2020-04-29 17:27 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: John Stultz @ 2020-04-29 17:23 UTC (permalink / raw)
To: lkml
Cc: John Stultz, linux-pm, 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
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 <gregkh@linuxfoundation.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Mark Brown <broonie@kernel.org>
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: Marek Szyprowski <m.szyprowski@samsung.com>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work"
2020-04-29 17:23 [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work" John Stultz
@ 2020-04-29 17:27 ` Mark Brown
2020-04-29 17:35 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2020-04-29 17:27 UTC (permalink / raw)
To: John Stultz
Cc: lkml, linux-pm, Greg Kroah-Hartman, Linus Walleij, Thierry Reding,
Liam Girdwood, Bjorn Andersson, Saravana Kannan, Todd Kjos,
Len Brown, Pavel Machek, Ulf Hansson, Kevin Hilman,
Rafael J. Wysocki, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
On Wed, Apr 29, 2020 at 05:23:49PM +0000, John Stultz wrote:
> 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.
Reviewed-by: Mark Brown <broonie@kernel.org>
I'm assuming this should go via the same path that the other revert
went.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work"
2020-04-29 17:27 ` Mark Brown
@ 2020-04-29 17:35 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2020-04-29 17:35 UTC (permalink / raw)
To: Mark Brown
Cc: John Stultz, lkml, linux-pm, Linus Walleij, Thierry Reding,
Liam Girdwood, Bjorn Andersson, Saravana Kannan, Todd Kjos,
Len Brown, Pavel Machek, Ulf Hansson, Kevin Hilman,
Rafael J. Wysocki, Rob Herring
On Wed, Apr 29, 2020 at 06:27:01PM +0100, Mark Brown wrote:
> On Wed, Apr 29, 2020 at 05:23:49PM +0000, John Stultz wrote:
> > 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.
>
> Reviewed-by: Mark Brown <broonie@kernel.org>
>
> I'm assuming this should go via the same path that the other revert
> went.
I'll be glad to take it that way :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-29 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-29 17:23 [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work" John Stultz
2020-04-29 17:27 ` Mark Brown
2020-04-29 17:35 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox