Re: [RESEND PATCH v2 1/2] MFD: MAX77693: add MAX77693 MFD driver

From: Mark Brown
Date: Sun May 13 2012 - 06:07:05 EST


On Fri, May 11, 2012 at 04:15:08PM +0200, Samuel Ortiz wrote:
> On Tue, Mar 20, 2012 at 10:07:58AM +0900, Chanwoo Choi wrote:

> > +static int __init max77693_i2c_init(void)
> > +{
> > + return i2c_add_driver(&max77693_i2c_driver);
> > +}
> > +/* init early so consumer devices can complete system boot */
> > +subsys_initcall(max77693_i2c_init);
> > +
> > +static void __exit max77693_i2c_exit(void)
> > +{
> > + i2c_del_driver(&max77693_i2c_driver);
> > +}
> > +module_exit(max77693_i2c_exit);

> You could use module_i2c_driver() here.

That doesn't work so well for PMICs yet - since cpufreq still doesn't
use struct device it can't use -EPROBE_DEFER which means that we need
the regulators to register before the cpufreq drivers and currently
we're doing that with the subsys_initcall() hack. Once cpufreq can
defer probes we should be able to stop doing this, it's the only blocker
at the minute.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/