summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-04-24 19:01:42 +0200
committerChanho Park <chanho61.park@samsung.com>2014-08-08 14:35:26 +0900
commit1c5ebc14b62b0362a8d61770558b77f80278fad1 (patch)
tree9f9a05ed0437d43f1c50109a7067674b3b4ef3c3 /drivers
parentc26a4f1fcdfef96412987fb865899807dbbd0755 (diff)
downloadlinux-3.10-1c5ebc14b62b0362a8d61770558b77f80278fad1.tar.gz
linux-3.10-1c5ebc14b62b0362a8d61770558b77f80278fad1.tar.bz2
linux-3.10-1c5ebc14b62b0362a8d61770558b77f80278fad1.zip
regulator: of: Parse regulator state in mem mode from DT
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/of_regulator.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 66ca769287a..cf2d6bf1d13 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -64,6 +64,26 @@ static void of_get_regulation_constraints(struct device_node *np,
ramp_delay = of_get_property(np, "regulator-ramp-delay", NULL);
if (ramp_delay)
constraints->ramp_delay = be32_to_cpu(*ramp_delay);
+
+ if (of_find_property(np, "regulator-mem-fast", NULL)) {
+ constraints->state_mem.enabled = true;
+ constraints->state_mem.mode = REGULATOR_MODE_FAST;
+ }
+
+ if (of_find_property(np, "regulator-mem-on", NULL)) {
+ constraints->state_mem.enabled = true;
+ constraints->state_mem.mode = REGULATOR_MODE_NORMAL;
+ }
+
+ if (of_find_property(np, "regulator-mem-idle", NULL)) {
+ constraints->state_mem.disabled = true;
+ constraints->state_mem.mode = REGULATOR_MODE_IDLE;
+ }
+
+ if (of_find_property(np, "regulator-mem-off", NULL)) {
+ constraints->state_mem.disabled = true;
+ constraints->state_mem.mode = REGULATOR_MODE_STANDBY;
+ }
}
/**