Re: [PATCH v2] regulator: add new regulator driver for lp872x

From: Mark Brown
Date: Fri Jun 15 2012 - 07:41:22 EST


On Fri, Jun 15, 2012 at 07:11:48PM +0800, Axel Lin wrote:

> > +       ret = gpio_request(gpio, "LP872X DVS");

> devm_gpio_request

Better yet...

> > +       gpio_direction_output(gpio, dvs->init_state);

...devm_gpio_request_one().

> > +module_i2c_driver(lp872x_driver);

> I think you need to use subsys_initcall() here.

> Regulators need to be available early in init in order to allow them
> to be available for consumers when requested.

Well, it depends on the regulator. Those with DCDCs that might supply
cpufreq do because cpufreq can't use deferred probes. Others should now
be able to use deferred probes which should removed the need for this.

Attachment: signature.asc
Description: Digital signature