Thread (39 messages) flat view 39 messages, 6 authors, 2016-09-01
STALE3651d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v3 [diff vs current]

[PATCH 2/9] regulator: of: setup initial suspend state

From: Keerthy <j-keerthy@ti.com>
Date: 2016-06-20 08:49:43
Also in: linux-omap, lkml
Subsystem: the rest, voltage and current regulator framework · Maintainers: Linus Torvalds, Liam Girdwood, Mark Brown

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 <redacted>
Signed-off-by: Dave Gerlach <redacted>
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/regulator/of_regulator.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index cd828db..4f613ec 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;
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help