summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2016-06-20 11:43:31 +0300
committerMark Brown <broonie@kernel.org>2016-06-22 18:15:34 +0300
commita0f78bc89c0396d14b6102c6f72485e14c8821f3 (patch)
tree9d852ca5db69afa09782c4b51a81a5e5fd7533be /drivers/regulator
parent1a695a905c18548062509178b98bc91e67510864 (diff)
downloadlinux-a0f78bc89c0396d14b6102c6f72485e14c8821f3.tar.xz
regulator: of: setup initial suspend state
Setup initial suspend state to mem, if suspend state is defined for mem state. This makes sure that the regulators are in proper mode already from boot. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/of_regulator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index cd828dbf9d52..4f613ec99500 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -163,6 +163,9 @@ static void of_get_regulation_constraints(struct device_node *np,
"regulator-suspend-microvolt", &pval))
suspend_state->uV = pval;
+ if (i == PM_SUSPEND_MEM)
+ constraints->initial_state = PM_SUSPEND_MEM;
+
of_node_put(suspend_np);
suspend_state = NULL;
suspend_np = NULL;