[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1542120469-15450-3-git-send-email-andrei.stefanescu@microchip.com>
Date: Tue, 13 Nov 2018 14:47:37 +0000
From: <Andrei.Stefanescu@...rochip.com>
To: <lgirdwood@...il.com>, <broonie@...nel.org>, <robh+dt@...nel.org>,
<mark.rutland@....com>
CC: <Nicolas.Ferre@...rochip.com>, <Cristian.Birsan@...rochip.com>,
<Claudiu.Beznea@...rochip.com>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <Andrei.Stefanescu@...rochip.com>
Subject: [PATCH 2/2] 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@...rochip.com>
---
drivers/regulator/of_regulator.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index a732f09..c711a0a 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",
};
@@ -185,9 +186,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;
}
--
2.7.4
Powered by blists - more mailing lists