[lkml]   [2016]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] regulator: core: don't disable regulator on init if boot_on set
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

> 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.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2016-10-08 13:24    [W:0.233 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site