From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Igor Grinberg <grinberg@compulab.co.il>,
Marek Vasut <marek.vasut@gmail.com>,
linux-arm-kernel@lists.infradead.org, vapier@gentoo.org,
khilman@deeprootsystems.com, linux-kernel@vger.kernel.org,
pavel@ucw.cz, linux-input@vger.kernel.org, eric.y.miao@gmail.com,
akpm@linux-foundation.org
Subject: Re: [PATCH v2] Input: Make ADS7846 independent on regulator
Date: Tue, 5 Oct 2010 13:42:41 -0700 [thread overview]
Message-ID: <20101005204241.GB23315@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20101005203508.7df590db@lxorguk.ukuu.org.uk>
On Tue, Oct 05, 2010 at 08:35:08PM +0100, Alan Cox wrote:
> > If the board doesn't use regulators you can just disable the regulator
> > API at which point it compiles out into stubs which report success -
> > this has been the case from day one. There's only an issue if the board
> > has a regulator configuration which is partially visible to software.
> Which is quite likely on anything complex and means that hardcoding
> regulator assumptions is bad.
When I say "partially visible" I mean where we can't say what's there -
we can cope fine with stuff that isn't software controllable. The issue
is that we can't automatically discover the system configuration.
> I actually see two ways of attacking that, one is that the dummy
> regulator *and* the compiled in regulator system have a standard
> regulator value that can be passed which means "report success, move
> along nothing to see" that could be passed into drivers, the other is to
> not stick the stuff in drivers.
> I suspect the former may be cleaner ?
I'm afraid I'm having a hard time parsing what you're saying here (what
would a "regulator value" be?), but I suspect that you're trying to
suggest something fairly close to what is already implemented.
The model the regulator API has is that neither the driver for the
regulator nor the driver for the consumer should know anything about the
particular board, with the consumers just requesting the supplies the
device has. A separate piece of board-specific configuration code
provides a table mapping the physical regulators in the system to the
supplies on the individual chips. There is an option, currently Kconfig
only, which causes the regulator API to provide a do-nothing dummy
regulator if an attempt is made to request a supply that doesn't exist.
I *think* this dummy regulator corresponds to what you're suggesting
above but like I say I'm having a hard time parsing it.
If the regulator API is compiled out then any attempt to get, enable or
disable a regulator just unconditionally reports success.
next prev parent reply other threads:[~2010-10-05 20:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 7:09 [PATCH v2] Input: Make ADS7846 independent on regulator Marek Vasut
2010-09-07 12:23 ` Igor Grinberg
2010-09-07 12:53 ` Mark Brown
2010-09-09 8:27 ` Marek Vasut
2010-09-09 9:41 ` Mark Brown
2010-10-01 0:20 ` Marek Vasut
2010-10-05 6:49 ` Igor Grinberg
2010-10-05 8:21 ` Marek Vasut
2010-10-05 16:16 ` Dmitry Torokhov
2010-10-05 16:40 ` Mark Brown
2010-10-05 18:07 ` Dmitry Torokhov
2010-10-05 18:59 ` Mark Brown
2010-10-05 19:35 ` Alan Cox
2010-10-05 20:42 ` Mark Brown [this message]
2010-10-05 22:09 ` Linus Walleij
2010-10-05 22:52 ` Mark Brown
2010-10-06 8:01 ` Linus Walleij
2010-10-06 15:14 ` Mark Brown
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=20101005204241.GB23315@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dmitry.torokhov@gmail.com \
--cc=eric.y.miao@gmail.com \
--cc=grinberg@compulab.co.il \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=pavel@ucw.cz \
--cc=vapier@gentoo.org \
/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).