diff options
author | Doug Anderson <dianders@chromium.org> | 2014-10-31 23:52:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-03 07:29:02 -0500 |
commit | 8cbcaea89cfc4603c954f50aaddc3172446961d1 (patch) | |
tree | aef6e4e03880ecc63ad8e1500e1805f47a2447f0 /drivers/regulator | |
parent | c99ade664177db9a73400465470b5bd25309c14e (diff) |
regulator: of: Add support for parsing microvolts for suspend state
Leverage all the work that was done in (40e20d6 regulator: of: Add
support for parsing regulator_state for suspend state) and throw in
the ability to set suspend microvolts from the device tree.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/of_regulator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 36a1f5cc14e9..50be70878d2d 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c | |||
@@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np, | |||
107 | "regulator-off-in-suspend")) | 107 | "regulator-off-in-suspend")) |
108 | suspend_state->disabled = true; | 108 | suspend_state->disabled = true; |
109 | 109 | ||
110 | if (!of_property_read_u32(suspend_np, | ||
111 | "regulator-suspend-microvolt", &pval)) | ||
112 | suspend_state->uV = pval; | ||
113 | |||
110 | of_node_put(suspend_np); | 114 | of_node_put(suspend_np); |
111 | suspend_state = NULL; | 115 | suspend_state = NULL; |
112 | suspend_np = NULL; | 116 | suspend_np = NULL; |