[U-Boot] [PATCH 23/23] ARM: tegra: Enable PCIe on Jetson TK1

Thierry Reding thierry.reding at gmail.com
Sat Aug 23 13:33:33 CEST 2014


On Fri, Aug 22, 2014 at 07:47:36PM -0600, Simon Glass wrote:
> Hi Thierry,
> 
> On 22 August 2014 16:03, Thierry Reding <thierry.reding at gmail.com> wrote:
> > On Fri, Aug 22, 2014 at 02:12:19PM -0600, Simon Glass wrote:
> >> On 22 August 2014 13:40, Thierry Reding <thierry.reding at gmail.com> wrote:
> > [...]
> >> > I've opted instead to provide an somewhat higher-level API that users
> >> > can call to set voltages on the regulators and enable them.
> >>
> >> But then this should use/extend the pmic interface I think, and not
> >> create a parallel one.
> >
> > It's not a parallel framework. And it's not anything out of the ordinary
> > either. There's a whole bunch of drivers in drivers/power that do the
> > very same thing.
> >
> > And I'm not sure something like Linux' regulator framework is something
> > that we really need in U-Boot. The code in question is usually run in
> > some board-specific initialization file, not from some generic driver
> > that would need to be used in conjunction with potentially very many
> > PMICs.
> 
> OK, well I suggest first take a look at pmic_tps65090.c and convince
> yourself that you can't plumb your pmic in in a similar way. It's up
> to you.

It's very similar to that driver except that it doesn't go through the
trouble of "registering" the PMIC. Instead it works roughly like this:

	struct as3722_pmic *pmic;

	err = as3722_init(&pmic, fdt);
	if (err < 0)
		return err;

	err = as3722_sd_set_voltage(pmic, ...);
	if (err < 0)
		return err;

	err = as3722_sd_enable(pmic, ...);
	if (err < 0)
		return err;

That saves the public API from having to repeatedly go and look up the
PMIC in the registry.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140823/b9151cf6/attachment.pgp>


More information about the U-Boot mailing list