[PATCH v2 5/5] regulator: axp20x: resolve self dependency issue

Boris BREZILLON boris.brezillon at free-electrons.com
Mon May 26 09:58:00 PDT 2014

Hello Mark,

On 26/05/2014 17:43, Mark Brown wrote:
> On Mon, May 26, 2014 at 04:58:12PM +0200, Boris BREZILLON wrote:
>> Some regulators might take their power supply from other regulators defined
>> by the same PMIC.
>> Retry regulators registration until all regulators are registered or the
>> last iteration didn't manage to register any new regulator (which means
>> there's an external dependency missing and we can thus return
> This is going to apply to most PMICs - we should factor this out into
> the core rather than implementing it individual drivers.  It works
> normally because typically the dependency is from DCDCs to LDOs and so
> with common naming schemes alphabetic sorting saves us.

I'm not sure I get what you mean.

AFAIU, we could factorize it by the mean of an helper function (say
devm_regulators_register), which would take a matches table and a
regulator desc table and do pretty much what I'm doing in this patch.

Is that what you had in mind ?

Best Regards,


Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering

More information about the linux-arm-kernel mailing list