summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2011-03-11 10:13:59 +0900
committerNiket Sirsi <nsirsi@nvidia.com>2011-05-23 16:56:25 -0700
commitcbb7d2b75535ed5f293bcac5b5ecd6cafa482f1a (patch)
tree25200a4c9c6656e33ea74317af24713b930a490d /include/linux
parentbfcebd948861654d11a02db03e5ac0ccbe641ab8 (diff)
Regulator: add suspend-finish API for regulator core.
The regulator core had suspend-prepare that turns off the regulators when entering a system-wide suspend. However, it did not have suspend-finish that pairs with suspend-prepare and the regulator core has assumed that the regulator devices and their drivers support autonomous recover at resume. This patch adds regulator_suspend_finish that pairs with the previously-existed regulator_suspend_prepare. The function regulator_suspend_finish turns on the regulators that have always_on set or positive use_count so that we can reset the regulator states appropriately at resume. In regulator_suspend_finish, if has_full_constraints, it disables unnecessary regulators. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> -- Updates v3 comments corrected (Thanks to Igor) v2 disable unnecessary regulators (Thanks to Mark) Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> (cherry picked from commit 7a32b589a9c856493bccb02db55047edc04eee7b) Reviewed-on: http://git.kernel.org/?p=linux/kernel/git/torvalds/ linux-2.6.git;a=commit;h=7a32b589a9c856493bccb02db55047edc04eee7b Change-Id: Iaf2e36e9d645c724e2d98e6566aadec5c013212e Reviewed-on: http://git-master/r/30956 Tested-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regulator/machine.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index e2980287245e..07ef3dc3500e 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -186,6 +186,7 @@ struct regulator_init_data {
};
int regulator_suspend_prepare(suspend_state_t state);
+int regulator_suspend_finish(void);
#ifdef CONFIG_REGULATOR
void regulator_has_full_constraints(void);