[UPSTREAM] Use new regulator API for pcf50633

Balaji Rao balajirrao at openmoko.org
Wed Oct 29 12:29:02 CET 2008


On Tue, Oct 28, 2008 at 03:04:27PM +0000, Liam Girdwood wrote:
> On Tue, 2008-10-28 at 20:22 +0530, Balaji Rao wrote:
> > On Tue, Oct 28, 2008 at 02:31:34PM +0000, Mark Brown wrote:
> > > On Tue, Oct 28, 2008 at 07:37:53PM +0530, Balaji Rao wrote:
> > > 
> > > > The probe method creates the platform devices for the regulators. My
> > > > question is, can we be 100% sure that when the
> > > > platform_device_register returns, the regulators have been registered ?
> > > 
> > > You can't guarantee that the regulator driver is available at all and
> > > will ever get loaded.  :)
> > 
> > Yes, exaclty! Suppose we assume that the driver is compiled in, can we
> > guarantee that ? 
> 
> They _should_ be built in (and were when I last worked on the WM8350). I
> missed this in the patch submission. A regulator driver should be marked
> bool in it's Kconfig and should be registered before any of it's
> consumers in board.c.
> 

I had tracked down the problem to the initcall order. The PMIC initcall
which tried to register consumers, happened before the regulator's
initcall. I've fixed it by making the PMIC driver's a late_initcall.
Things work fine now.

	- Balaji



More information about the openmoko-kernel mailing list