diff options
author | Andrei.Stefanescu@microchip.com <Andrei.Stefanescu@microchip.com> | 2018-11-13 15:47:37 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-13 18:28:50 +0100 |
commit | f2b4076988a9c229dab373470b4b108ef0e106c8 (patch) | |
tree | abc3ce1e75975caa467aa05261078c0d3842aa1c /drivers/regulator/of_regulator.c | |
parent | regulator: dt-bindings: add regulator-state-standby bindings (diff) | |
download | linux-f2b4076988a9c229dab373470b4b108ef0e106c8.tar.xz linux-f2b4076988a9c229dab373470b4b108ef0e106c8.zip |
regulator: of: add support for parsing regulator-state-standby
Set the according constraints for PM_SUSPEND_STANDBY case.
Previously, only suspend to mem/disk were taken into
consideration.
Signed-off-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r-- | drivers/regulator/of_regulator.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index c4223b3e0dff..82fb1228ca2c 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -20,6 +20,7 @@ #include "internal.h" static const char *const regulator_states[PM_SUSPEND_MAX + 1] = { + [PM_SUSPEND_STANDBY] = "regulator-state-standby", [PM_SUSPEND_MEM] = "regulator-state-mem", [PM_SUSPEND_MAX] = "regulator-state-disk", }; @@ -181,9 +182,11 @@ static void of_get_regulation_constraints(struct device_node *np, case PM_SUSPEND_MAX: suspend_state = &constraints->state_disk; break; + case PM_SUSPEND_STANDBY: + suspend_state = &constraints->state_standby; + break; case PM_SUSPEND_ON: case PM_SUSPEND_TO_IDLE: - case PM_SUSPEND_STANDBY: default: continue; } |