diff options
author | Chunyan Zhang <zhang.chunyan@linaro.org> | 2018-01-26 21:08:47 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-26 14:43:55 +0000 |
commit | f7efad10b5c492892b1e5decf5d3ebb29fa5c9af (patch) | |
tree | 10ca83d0c4c018b03cdaf9a9597e3d75bf2e1a1c /include/linux/regulator/driver.h | |
parent | aa27bbc6c6c60227c096d515f55ffe6cdfef7d2b (diff) |
regulator: add PM suspend and resume hooks
In this patch, consumers are allowed to set suspend voltage, and this
actually just set the "uV" in constraint::regulator_state, when the
regulator_suspend_late() was called by PM core through callback when
the system is entering into suspend, the regulator device would act
suspend activity then.
And it assumes that if any consumer set suspend voltage, the regulator
device should be enabled in the suspend state. And if the suspend
voltage of a regulator device for all consumers was set zero, the
regulator device would be off in the suspend state.
This patch also provides a new function hook to regulator devices for
resuming from suspend states.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r-- | include/linux/regulator/driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 94417b4226bd..4c00486b7a78 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -214,6 +214,8 @@ struct regulator_ops { /* set regulator suspend operating mode (defined in consumer.h) */ int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode); + int (*resume_early)(struct regulator_dev *rdev); + int (*set_pull_down) (struct regulator_dev *); }; |