[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091203134031.GA1311@rakim.wolfsonmicro.main>
Date: Thu, 3 Dec 2009 13:40:32 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Daniel Mack <daniel@...aq.de>
Cc: linux-kernel@...r.kernel.org, Liam Girdwood <lrg@...mlogic.co.uk>,
Pierre Ossman <pierre@...man.eu>,
Andrew Morton <akpm@...ux-foundation.org>,
Matt Fleming <matt@...sole-pimps.org>,
Adrian Hunter <adrian.hunter@...ia.com>,
David Brownell <dbrownell@...rs.sourceforge.net>,
Russell King <rmk+kernel@....linux.org.uk>,
Linus Walleij <linus.walleij@...ricsson.com>,
Eric Miao <eric.y.miao@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Cliff Brake <cbrake@...-systems.com>,
Jarkko Lavinen <jarkko.lavinen@...ia.com>,
linux-mmc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mmc: move regulator handling to core
On Thu, Dec 03, 2009 at 02:32:00PM +0100, Daniel Mack wrote:
> On Thu, Dec 03, 2009 at 01:22:41PM +0000, Mark Brown wrote:
> > On Thu, Dec 03, 2009 at 02:14:23PM +0100, Daniel Mack wrote:
> > > I would expect the power to be killed when the last user stops using it.
> > > Which should result in the same effect if you only have one host, one
> > > regulator, and one user.
> > Yes, it's always fine in that case (modulo always_on and/or regulators
> > without power control).
> Well, it didn't for me and always_on, though, due to the return values I
> described.
I mean your new code is fine.
> > This goes back to the thing about using
> > regulator_get_exclusive(), the message given was that the MMC drivers
> > really needed to be able to guarantee that the power would be removed
> > when that was requested.
> > Like I say, if there isn't a *strict* requirement but it's only
> > desirable (possibly strongly desirable) then your approach is obviously
> > preferable.
> The mmci people would need to answer that. To me, the code just looked
> like a power saving feature.
> If this driver needs it, the only tweak to my patch to let that
> particular call site use regulator_get_exclusive, and the core will
> still do the right thing. For this case, the behaviour should be exactly
> the same than it currently is, correct?
No, you'll also need to update the way the driver bootstraps the
reference count since with regulator_get_exclusive() the reference count
is initialised to 1 if the regulator is enabled when it is claimed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists