Merge tag 'sound-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[deliverable/linux.git] / drivers / regulator / of_regulator.c
index 6b0aa80b22fd1b4817c65995dfc1424fbb3d0c31..4f613ec995004dc04aa62bef738091bdaf38093d 100644 (file)
@@ -45,9 +45,9 @@ static void of_get_regulation_constraints(struct device_node *np,
        /* Voltage change possible? */
        if (constraints->min_uV != constraints->max_uV)
                constraints->valid_ops_mask |= REGULATOR_CHANGE_VOLTAGE;
-       /* Only one voltage?  Then make sure it's set. */
-       if (constraints->min_uV && constraints->max_uV &&
-           constraints->min_uV == constraints->max_uV)
+
+       /* Do we have a voltage range, if so try to apply it? */
+       if (constraints->min_uV && constraints->max_uV)
                constraints->apply_uV = true;
 
        if (!of_property_read_u32(np, "regulator-microvolt-offset", &pval))
@@ -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;
This page took 0.0305 seconds and 5 git commands to generate.