From: Mark Brown <broonie@sirena.org.uk>
To: dbrownell@users.sourceforge.net
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
lkml <linux-kernel@vger.kernel.org>,
OMAP <linux-omap@vger.kernel.org>
Subject: Re: [patch 2.6.29-rc7 regulator-next] regulator: refcount fixes
Date: Thu, 12 Mar 2009 21:05:46 +0000 [thread overview]
Message-ID: <20090312210545.GJ24376@sirena.org.uk> (raw)
In-Reply-To: <200903121335.25368.david-b@pacbell.net>
On Thu, Mar 12, 2009 at 12:35:24PM -0800, David Brownell wrote:
> On Thursday 12 March 2009, Mark Brown wrote:
> > safely share a regulator without extra work since they have no way of
> > telling why a regulator is in the state that it's in without extra
> > stuff.
> Depends what you mean by "safely". If they weren't buggy
> already, I don't see how they'd notice any difference.
> Having buggy consumers become non-buggy isn't exactly a
> job for the framework itself.
Previously the per-consumer reference count would've meant that they
couldn't interfere with other consumers - they could set their own
state but not reverse an enable something else had done. Now there is
only one reference count but there's no way for a consumer to exclude
other consumers and nothing which protects against breakage.
> > We should probably have something along the lines of a
> > regulator_get_exclusive() for them. Previously the consumer counting
> > would have stopped them interfering with enables done by other
> > consumers.
> I'd like to see get()/put() match the design pattern used
> elsewhere in the kernel: those calls signify refcount
> operations.
Aquiring a reference is obviously what we want in the rather common case
where the supply is shared. We could name an operation that enforces
non shared supplies something else but at the end of the day it's going
to be the same operation. The major purpose of adding an explicit call
for this is to document the requirement the consumer has for direct
control of what it's doing.
> Agreed that the "consumer" access model probably needs a few
> interface updates. I'm not sure what they would be though;
> one notion would be to focus on the constraints they apply
> (including "enabled") instead of what they do now.
I'm not at all sure what you mean by this - constraint narrowing by the
consumers is pretty much exactly the model the existing code has. We
need to do things like re-add the voltage handling that was removed pre
merge but that's already the programming model we have.
next prev parent reply other threads:[~2009-03-12 21:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 0:43 David Brownell
2009-03-12 2:32 ` [patch 2.6.29-rc7 regulator-next] regulator: init fixes David Brownell
2009-03-12 12:01 ` Mark Brown
2009-03-15 0:25 ` [patch 2.6.29-rc8 regulator-next] regulator: init fixes (v4) David Brownell
2009-03-15 0:37 ` Mark Brown
2009-03-15 4:05 ` David Brownell
2009-03-16 21:54 ` Mark Brown
2009-03-17 18:15 ` David Brownell
2009-03-17 20:08 ` Mark Brown
2009-03-18 19:25 ` David Brownell
2009-03-18 20:33 ` Mark Brown
2009-03-18 21:02 ` David Brownell
2009-03-19 19:27 ` Mark Brown
2009-03-18 21:14 ` David Brownell
2009-03-19 16:59 ` Mark Brown
2009-03-15 4:16 ` [patch 2.6.29-rc7 regulator-next] regulator: init fixes David Brownell
2009-03-12 10:37 ` [patch 2.6.29-rc7 regulator-next] regulator: refcount fixes Mark Brown
2009-03-12 20:35 ` David Brownell
2009-03-12 21:05 ` Mark Brown [this message]
2009-03-12 23:02 ` David Brownell
2009-03-13 1:38 ` Mark Brown
2009-03-14 21:29 ` David Brownell
2009-03-15 0:30 ` Mark Brown
2009-03-15 4:27 ` David Brownell
2009-03-12 10:56 ` Liam Girdwood
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=20090312210545.GJ24376@sirena.org.uk \
--to=broonie@sirena.org.uk \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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
all inboxes | Powered by JetHome®