diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2011-03-11 01:13:59 (GMT) |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-03-26 14:15:04 (GMT) |
commit | 7a32b589a9c856493bccb02db55047edc04eee7b (patch) | |
tree | a47d83f3d1320de5a18c513072c17cdc070d2bbf /include | |
parent | fb7c18cac8608983168a7f4f55193cea190c83c8 (diff) | |
download | linux-7a32b589a9c856493bccb02db55047edc04eee7b.tar.xz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regulator/machine.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 761c745..c4c4fc4 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); |