linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete)
@ 2013-11-25 21:57 Fabio Estevam
  2013-11-26  0:46 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-11-25 21:57 UTC (permalink / raw)
  To: broonie; +Cc: shawn.guo, linux-kernel, thierry.reding, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

Commit 22ceeee1 (pwm-backlight: Add power supply support) introduced the usage
of regulator API into the pwm backlight driver and caused a regression on some 
boards like mx28evk and mx6qsabresd, resulting in blank display output:

pwm-backlight backlight.18: dummy supplies not allowed

Calling regulator_init_complete via late_initcall can be too 'late' for the 
regulator to be available for the pwm backlight driver.

Call regulator_init_complete with postcore_initcall level instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 3fe1313..d908a95 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3850,4 +3850,4 @@ unlock:
 
 	return 0;
 }
-late_initcall(regulator_init_complete);
+postcore_initcall(regulator_init_complete);
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete)
  2013-11-25 21:57 [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete) Fabio Estevam
@ 2013-11-26  0:46 ` Mark Brown
  2013-11-27  0:55   ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-11-26  0:46 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: shawn.guo, linux-kernel, thierry.reding, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

On Mon, Nov 25, 2013 at 07:57:35PM -0200, Fabio Estevam wrote:

> Calling regulator_init_complete via late_initcall can be too 'late' for the 
> regulator to be available for the pwm backlight driver.

> Call regulator_init_complete with postcore_initcall level instead.

That's too early for some of the other functionality in this function
though - I'd be particularly worried about the code that goes aroud
turning off unused supplies running before drivers have a chance to load
either breaking things or causing user visible glitches (and of course
the goal here is to get have this run before that happens...).

I seem to remember that there's also some one initcall per object
limitation so if we are going to try to dance this dance purely in the
regulator code it'd probably need to be split out into another object as
well as another function.  The other options that were suggested were to
either have the DT code push out the announcement or change the callers
to check of_have_populated_dt() as well as looking at the flag, of this
lot changing the callers is probably the cleanest.  I'll probably do
that tomorrow if a patch doesn't turn up before then.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete)
  2013-11-26  0:46 ` Mark Brown
@ 2013-11-27  0:55   ` Mark Brown
  2013-12-15 13:06     ` Shawn Guo
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-11-27  0:55 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: shawn.guo, linux-kernel, thierry.reding, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Tue, Nov 26, 2013 at 12:46:03AM +0000, Mark Brown wrote:

> lot changing the callers is probably the cleanest.  I'll probably do
> that tomorrow if a patch doesn't turn up before then.

Sorry, that'll now be Wednesday - an unusually busy day started by
someone deciding to fell trees outside my window early this morning put
a bit of a spanner in the works.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete)
  2013-11-27  0:55   ` Mark Brown
@ 2013-12-15 13:06     ` Shawn Guo
  2013-12-15 17:03       ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Shawn Guo @ 2013-12-15 13:06 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, linux-kernel, thierry.reding, Fabio Estevam

On Wed, Nov 27, 2013 at 12:55:20AM +0000, Mark Brown wrote:
> On Tue, Nov 26, 2013 at 12:46:03AM +0000, Mark Brown wrote:
> 
> > lot changing the callers is probably the cleanest.  I'll probably do
> > that tomorrow if a patch doesn't turn up before then.
> 
> Sorry, that'll now be Wednesday - an unusually busy day started by
> someone deciding to fell trees outside my window early this morning put
> a bit of a spanner in the works.

What is going on about that patch?

Shawn


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete)
  2013-12-15 13:06     ` Shawn Guo
@ 2013-12-15 17:03       ` Fabio Estevam
  2013-12-16  8:40         ` Shawn Guo
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-12-15 17:03 UTC (permalink / raw)
  To: Shawn Guo; +Cc: Mark Brown, linux-kernel, Thierry Reding, Fabio Estevam

On Sun, Dec 15, 2013 at 11:06 AM, Shawn Guo <shawn.guo@linaro.org> wrote:

> What is going on about that patch?

Mark fixed the problem with the following commits:

commit 75bc9641cadd2a3f91f9c2e7f2fdfdeb8bd4b1d6
Author: Mark Brown <broonie@linaro.org>
Date:   Wed Nov 27 16:22:53 2013 +0000

    regulator: core: Check for DT every time we check full constraints

    Eliminate the gap between DT becoming available and this being used to say
    we have full constraints by checking directly for DT every time we check
    for full constraints. This improves interoperaton with optional regulator
    support.

    Signed-off-by: Mark Brown <broonie@linaro.org>
    Tested-by: Fabio Estevam <fabio.estevam@freescale.com>

commit 87b2841753e1694fc96fefb467f6aff9940b07af
Author: Mark Brown <broonie@linaro.org>
Date:   Wed Nov 27 16:13:10 2013 +0000

    regulator: core: Replace checks of have_full_constraints with a function

    Simple code reorganisation so we can change the logic for deciding what
    full constraints are more easily.

    Signed-off-by: Mark Brown <broonie@linaro.org>

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete)
  2013-12-15 17:03       ` Fabio Estevam
@ 2013-12-16  8:40         ` Shawn Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2013-12-16  8:40 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Mark Brown, linux-kernel, Thierry Reding, Fabio Estevam

On Sun, Dec 15, 2013 at 03:03:00PM -0200, Fabio Estevam wrote:
> On Sun, Dec 15, 2013 at 11:06 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> 
> > What is going on about that patch?
> 
> Mark fixed the problem with the following commits:

Thanks for the info, Fabio.

Shawn

> 
> commit 75bc9641cadd2a3f91f9c2e7f2fdfdeb8bd4b1d6
> Author: Mark Brown <broonie@linaro.org>
> Date:   Wed Nov 27 16:22:53 2013 +0000
> 
>     regulator: core: Check for DT every time we check full constraints
> 
>     Eliminate the gap between DT becoming available and this being used to say
>     we have full constraints by checking directly for DT every time we check
>     for full constraints. This improves interoperaton with optional regulator
>     support.
> 
>     Signed-off-by: Mark Brown <broonie@linaro.org>
>     Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
> 
> commit 87b2841753e1694fc96fefb467f6aff9940b07af
> Author: Mark Brown <broonie@linaro.org>
> Date:   Wed Nov 27 16:13:10 2013 +0000
> 
>     regulator: core: Replace checks of have_full_constraints with a function
> 
>     Simple code reorganisation so we can change the logic for deciding what
>     full constraints are more easily.
> 
>     Signed-off-by: Mark Brown <broonie@linaro.org>
> 
> Regards,
> 
> Fabio Estevam


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-16  8:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25 21:57 [PATCH] regulator: core: Use postcore_initcall(regulator_init_complete) Fabio Estevam
2013-11-26  0:46 ` Mark Brown
2013-11-27  0:55   ` Mark Brown
2013-12-15 13:06     ` Shawn Guo
2013-12-15 17:03       ` Fabio Estevam
2013-12-16  8:40         ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).