linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DT support for input-supply of regulator.
@ 2012-05-18 16:49 Laxman Dewangan
  2012-05-19 10:44 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Laxman Dewangan @ 2012-05-18 16:49 UTC (permalink / raw)
  To: Mark Brown, Stephen Warren; +Cc: linux-kernel

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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DT support for input-supply of regulator.
  2012-05-18 16:49 DT support for input-supply of regulator Laxman Dewangan
@ 2012-05-19 10:44 ` Mark Brown
  2012-05-19 15:04   ` Laxman Dewangan
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-05-19 10:44 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: Stephen Warren, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

On Fri, May 18, 2012 at 10:19:32PM +0530, Laxman Dewangan wrote:

> 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?

I'm sorry but I'm having a really hard time parsing what you're saying
above.  It sounds like there's some sort of device tree specific bug
that needs fixing.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DT support for input-supply of regulator.
  2012-05-19 10:44 ` Mark Brown
@ 2012-05-19 15:04   ` Laxman Dewangan
  0 siblings, 0 replies; 3+ messages in thread
From: Laxman Dewangan @ 2012-05-19 15:04 UTC (permalink / raw)
  To: Mark Brown; +Cc: Stephen Warren, linux-kernel

On Saturday 19 May 2012 04:14 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Fri, May 18, 2012 at 10:19:32PM +0530, Laxman Dewangan wrote:
>
>> 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?
> I'm sorry but I'm having a really hard time parsing what you're saying
> above.  It sounds like there's some sort of device tree specific bug
> that needs fixing.
>

I found small issue in core regulator and the tps65910 regulator driver 
where it was not passing correct regulator node. After fixing this, it 
worked fine.
I already sent the patches for review.

Thanks,
Laxman



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-19 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 16:49 DT support for input-supply of regulator Laxman Dewangan
2012-05-19 10:44 ` Mark Brown
2012-05-19 15:04   ` Laxman Dewangan

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).