public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Graeme Gregory <gg@slimlogic.co.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Stephen Warren <swarren@nvidia.com>,
	"ian@slimlogic.co.uk" <ian@slimlogic.co.uk>,
	"lrg@ti.com" <lrg@ti.com>
Subject: Re: [PATCH] regulator: palmas: use correct device node for DT parsing
Date: Fri, 1 Mar 2013 18:15:55 +0530	[thread overview]
Message-ID: <5130A303.4060909@nvidia.com> (raw)
In-Reply-To: <20130301063915.GD25302@opensource.wolfsonmicro.com>

On Friday 01 March 2013 12:09 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Wed, Feb 27, 2013 at 02:23:42PM +0000, Graeme Gregory wrote:
>> On 27/02/13 14:10, Laxman Dewangan wrote:
>>> When device is registered through the DT then regulators node
>>> exist in the parent device node of regulator driver. Hence passing
>>> parent device node for parsing DT in place of self-device node
>>> which is typically NULL.
>>> -	struct device_node *node = pdev->dev.of_node;
>>> +	struct device_node *node = pdev->dev.parent->of_node;
>> This is not correct, nor is the reasoning.
>> I suspect your previous patch broke DT probing so your not getting nodes
>> filled in.
> So, the reason that this pattern has generally been followed is so that
> the regulator core can do the equivalent of regulator_get(dev, supply)
> to find the supplies.  Using the parent device there is particularly
> important in non-DT systems so that we can map the child regulator
> supply in by using the dev_name() of the parent rather than the MFD
> internal subdevice name but for pure DT systems where it's all just
> direct links it's less of an issue.
>
>

If I make the dts file as
                         #gpio-cells = <2>;
                         gpio-controller;

                        palmas_pmic {
                                compatible = "ti,palmas-pmic";
                                ti,ldo6_vibrator = <0>;

                                regulators {
                                     :::::::::::::
                                 }
                         }


then regulator get registered properly.
And hence this patch is not require here.


  reply	other threads:[~2013-03-01 12:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 14:10 [PATCH] regulator: palmas: use correct device node for DT parsing Laxman Dewangan
2013-02-27 14:23 ` Graeme Gregory
2013-02-27 14:28   ` Laxman Dewangan
2013-03-01  6:39   ` Mark Brown
2013-03-01 12:45     ` Laxman Dewangan [this message]
2013-03-01 12:50       ` Ian Lartey

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=5130A303.4060909@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gg@slimlogic.co.uk \
    --cc=ian@slimlogic.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=swarren@nvidia.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