浏览代码

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>
Keerthy 9 年之前
父节点
当前提交
a0f78bc89c
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/regulator/of_regulator.c

+ 3 - 0
drivers/regulator/of_regulator.c

@@ -163,6 +163,9 @@ static void of_get_regulation_constraints(struct device_node *np,
 					"regulator-suspend-microvolt", &pval))
 					"regulator-suspend-microvolt", &pval))
 			suspend_state->uV = pval;
 			suspend_state->uV = pval;
 
 
+		if (i == PM_SUSPEND_MEM)
+			constraints->initial_state = PM_SUSPEND_MEM;
+
 		of_node_put(suspend_np);
 		of_node_put(suspend_np);
 		suspend_state = NULL;
 		suspend_state = NULL;
 		suspend_np = NULL;
 		suspend_np = NULL;