From 8cbcaea89cfc4603c954f50aaddc3172446961d1 Mon Sep 17 00:00:00 2001 From: Doug Anderson Date: Fri, 31 Oct 2014 20:52:58 -0700 Subject: [PATCH] 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 Reviewed-by: Javier Martinez Canillas Reviewed-by: Chris Zhong Signed-off-by: Mark Brown --- drivers/regulator/of_regulator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 36a1f5c..50be708 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, "regulator-off-in-suspend")) suspend_state->disabled = true; + if (!of_property_read_u32(suspend_np, + "regulator-suspend-microvolt", &pval)) + suspend_state->uV = pval; + of_node_put(suspend_np); suspend_state = NULL; suspend_np = NULL; -- 2.7.4