From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Premi, Sanjeev" <premi@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: omap3: regulator_get() failure in ads7846
Date: Tue, 7 Sep 2010 15:18:40 +0100 [thread overview]
Message-ID: <20100907141839.GA31268@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB59301F6C838DE@dbde02.ent.ti.com>
On Tue, Sep 07, 2010 at 06:56:47PM +0530, Premi, Sanjeev wrote:
> > From: linux-input-owner@vger.kernel.org
> > [mailto:linux-input-owner@vger.kernel.org] On Behalf Of Mark Brown
> > What makes you say this? The names for regulator supplies are defined
> > in terms of the chip being supplied, not in terms of the board.
> [sp] The name "vcc" is too generic name for the regulator supply. If
> there were more than one supplies as in case of the omap3evm, it
> would be difficult to name the supply as "vcc".
As I said above: these are defined in terms of the *chip* being
supplied. The name of the pin on the device does not change depending
on which board they're soldered down on and is orthogonal to both the
name of the supply on the regulator and both are orthogonal to the name
the rail is given on a given board.
> Assuming there is another (different) driver which uses "vcc"
> (as ads7846 uses currently) but uses different supply, what is
> expected behavior?
The expected behaviour is that both devices request the supplies under
the names that they are given by the chip.
> If, however, the name here was something like "vcc_ts", then
> the supplies could be defined for any board as:
> static struct regulator_consumer_supply my_board_ts_supply = {
> .supply = "vcc_ts",
> };
> This would be more portable for other boards as well.
Using strings like this doesn't scale - you may have two devices of a
given type with different supply arrangements on a board, for example.
> Does regulator_get() searches by "device_name-supply_id" pair?
> Then, my comments above don't hold... And I would try the
> mapping you mentioned below.
Yes, this is the reason why we require the struct device in get().
> > > Looking at pointers on how this should be handled.
> > The best thing to do is to define the mapping for the regulator. You
> > can work around it by enabling REGULATOR_DUMMY.
> [sp] Yes, this would be a workaround; but it comes with another
> warning on console.
Yes, you're not really supposed to use it in production.
next prev parent reply other threads:[~2010-09-07 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 11:46 omap3: regulator_get() failure in ads7846 Premi, Sanjeev
2010-09-07 11:56 ` Mark Brown
2010-09-07 13:26 ` Premi, Sanjeev
2010-09-07 14:18 ` Mark Brown [this message]
2010-09-07 12:16 ` Igor Grinberg
2010-09-07 12:51 ` Mark Brown
2010-09-07 12:53 ` Premi, Sanjeev
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=20100907141839.GA31268@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=premi@ti.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