Re: [patch] regulator: core: don't disable regulator on init if boot_on set
From: Mark Brown
Date: Sat Oct 08 2016 - 07:24:03 EST
On Fri, Oct 07, 2016 at 11:28:13AM -0400, Samuel Morris wrote:
> Even though the core has been told the hardware is on with the boot_on
> constraint, it turns it off anyway during regulator_late_cleanup(). This
All that constraint does is tell the framework what the initial setting
is, nothing more - it's there for regulators where we don't have the
ability to read back the initial state due to hardware limitations.
> potentially causes problems for devices not tracked by the regulator
> framework
If the system needs the regulator to be always on you should flag it as
such, you shouldn't rely on some other consumer coming along that
happens to need the regulator enabling - there's no guarantee the user
will enable that consumer or that the consumer power management won't be
improved in the future causing it to not keep the regulator enabled
constantly.
> that rely on that device being powered at boot. Resources are also
If you have consumers that aren't integrated into the regulator
framework you need to use always on.
> needlessly wasted disabling and later reenabling the device when the first
> consumer of the regulator calls regulator_enable().
This is expected, we have no way of telling if a driver for the device
will ever load so at some point we have to power idle regulators off if
we don't want to waste power on them (it is common for systems to have
idle regulators due to inflexibility in PMIC configuration). The extra
overhead of reenabling is generally trivial.
Attachment:
signature.asc
Description: PGP signature