From: Keerthy Date: Mon, 20 Jun 2016 08:43:31 +0000 (+0530) Subject: regulator: of: setup initial suspend state X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0f78bc89c0396d14b6102c6f72485e14c8821f3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Signed-off-by: Mark Brown --- 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;