From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: "lrg@ti.com" <lrg@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: core: use correct device for device supply lookup
Date: Sat, 19 May 2012 19:26:59 +0100 [thread overview]
Message-ID: <20120519182658.GB4039@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4FB7DEB0.3040001@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]
On Sat, May 19, 2012 at 11:26:00PM +0530, Laxman Dewangan wrote:
> At the time of registration, as becasue there is valid
> reg_desc->supply_name and hence it tries to lookup the entry for
> <name>-supply i.e. v2-supply in this case for getting regulator_dev.
> regulator_register() {
> static struct regulator_dev *regulator_dev_lookup(struct device *dev,
> const char *supply,
> int *ret)
> {
> /* first do a dt based lookup */
> ----> Checked here, dev is not null but dev->of_node is null.
> if (dev && dev->of_node) {
>
> ------------>The issue is that I am not getting here as dev->node is
> null here.
But how is this related your patch? What your patch does is change
things so that instead of trying to look up the supply in the context of
whatever device was passed in by the driver we try to look it up in the
context of the class device we create. I can't think of any situation
where I'd expect that to make matters any better - the class device
should certainly never appear in the device tree and isn't going to have
a stable name for non-DT systems either.
I'm just not seeing any problem in the core here. It sounds to me like
the problem might be either with the regulator driver doing something
odd with the struct device it specifies when registering the regulator
(though I'm guessing that it's the tps65910 which looks to be doing
something sensible currently) or the device tree for the board being
odd. Looking at the changes you posted to tps65910 I suspect the issue
is that you've changed the driver to pass in the platform device for the
regulators as their device rather than the I2C device but it's the I2C
device which appears in the device tree bindings.
If there is a change needed in the core you need to explain what you
believe that change will do.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-19 18:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-19 14:14 [PATCH] regulator: core: use correct device for device supply lookup Laxman Dewangan
2012-05-19 16:41 ` Mark Brown
2012-05-19 17:14 ` Laxman Dewangan
2012-05-19 17:20 ` Laxman Dewangan
2012-05-19 17:40 ` Mark Brown
2012-05-19 17:56 ` Laxman Dewangan
2012-05-19 18:26 ` Mark Brown [this message]
2012-05-19 19:03 ` Laxman Dewangan
2012-05-19 20:50 ` Mark Brown
2012-05-19 21:13 ` Laxman Dewangan
2012-05-19 23:13 ` Mark Brown
2012-05-20 7:34 ` Laxman Dewangan
2012-05-20 9:01 ` Mark Brown
[not found] ` <4FB8C9EF.7010400@nvidia.com>
2012-05-20 12:06 ` Mark Brown
2012-05-20 12:14 ` Laxman Dewangan
2012-05-20 12:10 ` Laxman Dewangan
2012-05-19 17:28 ` 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=20120519182658.GB4039@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@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