obtaining a regulator from a phandle

Stephen Warren swarren at nvidia.com
Tue Mar 6 03:44:46 EST 2012


Thierry Reding wrote at Monday, March 05, 2012 8:22 AM:
> I'm working on getting DT support for PCIe on Tegra working. The Tegra PCIe
> controller needs a specific voltage supplied by a regulator on the board that
> I use (Harmony-compatible), so what I did was add DT support for the PMU
> (tps6586x) to provide the corresponding regulator:
...
> Within the device node of the PCIe controller, I reference the ldo0 regulator
> like so:
> 
> 	pcie at 80000000 {
> 		pex-clk-supply = <&ldo0_reg>;
> 	};
> 
> This all works well, except there seems to be no API to obtain a regulator
> from the DT phandle.

regulator_get(pcie_dev, "pex-clk") should work.

Of course, the PCIe host on Tegra isn't yet a platform device, so would
have to be converted.

-- 
nvpublic



More information about the devicetree-discuss mailing list