linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Mark Brown <broonie@sirena.org.uk>
Cc: Tony Lindgren <tony@atomide.com>,
	Steve Sakoman <sakoman@gmail.com>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: Re: Overo broken after recent mainline merge
Date: Sat, 14 Mar 2009 14:14:05 -0700	[thread overview]
Message-ID: <200903141414.06045.david-b@pacbell.net> (raw)
In-Reply-To: <20090314202250.GA17554@sirena.org.uk>

On Saturday 14 March 2009, Mark Brown wrote:
> On Sat, Mar 14, 2009 at 12:08:30PM -0700, David Brownell wrote:
> 
> > The basic problem is that still-unfixed goofage in the regulator
> > framework:  it seriously mis-handles regulators that bootloaders
> > leave enabled.  This can be teased apart into at least two bugs,
> > possibly as many as four.  The fix for one of them is queued in
> > the regulator-next tree.
> 
> For clarity, what David is referring to here is that it's not currently
> possible for the machine constraints to turn off a regulator that has
> been left enabled when the kernel starts.

Not quite -- that would be one solution, for the first
several cases I had to deal with.

But thinking about how to handle the video support makes
it clear that's not always the best solution.  One needs
bootloaders to be able to throw a splash screen which
stays active until the window system kicks in ... but
turning off video regulators would clearly blacken the
screen, which is the wrong model.  (And marking them as
"always on" or "boot_on" is wrong for other reasons.)

The way clocks handle that is with a late disable,
so drivers have a chance to start up.  You rejected
the REGULATOR_DISABLE_UNUSED patch I sent, applying
that model ... and that's why I started to think about
other approaches, as in the "early disable" patch I
sent earlier in this thread.

A third approach (after applying that one patch that's
in the regulator-next tree) would be

	if (rdev->is_enabled() > 0)
		rdev->use_count = 1;

when initializing regulators.  I updated the TWL4030
code so is_enabled() checks only the Linux enables,
while get_status() reports the true state, so maybe
that would be a solution you'd accept.

Of course that makes use_count be even more of a
misnomer, but that's a separate issue ... refcounts
should be handled by the driver model.

- Dave



  reply	other threads:[~2009-03-14 21:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14 13:24 Overo broken after recent mainline merge Steve Sakoman
2009-03-14 16:12 ` Tony Lindgren
2009-03-14 19:08   ` David Brownell
2009-03-14 20:22     ` Mark Brown
2009-03-14 21:14       ` David Brownell [this message]
2009-03-14 22:34         ` Mark Brown
2009-03-15  3:18           ` David Brownell
2009-03-15  3:36           ` David Brownell
2009-03-14 23:47     ` Steve Sakoman
2009-03-15  2:00       ` David Brownell
2009-03-15  3:56         ` Steve Sakoman
2009-03-15 19:56         ` Steve Sakoman
2009-03-15 22:15           ` Steve Sakoman
2009-03-15 22:32             ` Steve Sakoman
2009-03-15 23:16           ` David Brownell
2009-03-20 19:18     ` [APPLIED] " Tony Lindgren
2009-03-20 22:33       ` David Brownell
2009-03-23 16:00         ` Mark Brown
2009-03-23 19:27         ` [APPLIED] " Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200903141414.06045.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=broonie@sirena.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=sakoman@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).