linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Stephen Warren <swarren@nvidia.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: DT support for input-supply of regulator.
Date: Fri, 18 May 2012 22:19:32 +0530	[thread overview]
Message-ID: <4FB67D9C.2040909@nvidia.com> (raw)

Hi Mark,
When mapping the dts file for different regulator, observe that the 
input  input-supply is not getting correctly.


I have following structure in the dts file for registering the regulators:

        pmu: tps65910@d2 {
                 compatible = "ti,tps65910";
                 reg = <0xd2>;

                 #gpio-cells = <2>;
                 gpio-controller;
::::::::::

                 regulators {
                         vdd1_reg: vdd1 {
                                 regulator-min-microvolt = < 600000>;
                                 regulator-max-microvolt = <1500000>;
                         };
                         vdd2_reg: vdd2 {
                                 regulator-min-microvolt = < 600000>;
                                 regulator-max-microvolt = <1500000>;
                                 vin-supply = <&vdd1_reg>
                         };
                 };
     };


Now the regulator vdd1 get register properly, but when looking for the 
registration for vdd2, it is not able to identify the 
init_data->supply_regulator as we do not parse it.
So for this, I added the code in case on such
In function of_get_regulation_constraints()
         if (of_find_property(np, "vin-supply", NULL))
                 (*init_data)->supply_regulator = "vin";

So when vdd2 registration happen, it looks for the vin-supply.

But when it looks for the device node containing this regulator, it 
starts searching of the props from the dev_node of parent device i.e. 
pmu: tps65910@d2 and in search, it does not found the vin-supply 
property. It got property for compatible reg, gpio_cell, gpio-controller 
and then no more property.

Is there any issue in laying down the regulator structure?

Thanks,
Laxman






             reply	other threads:[~2012-05-18 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 16:49 Laxman Dewangan [this message]
2012-05-19 10:44 ` DT support for input-supply of regulator Mark Brown
2012-05-19 15:04   ` Laxman Dewangan

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=4FB67D9C.2040909@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).