From: <Andrei.Stefanescu@microchip.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <robh+dt@kernel.org>,
<mark.rutland@arm.com>
Cc: <Nicolas.Ferre@microchip.com>, <Cristian.Birsan@microchip.com>,
<Claudiu.Beznea@microchip.com>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <Andrei.Stefanescu@microchip.com>
Subject: [PATCH 2/2] regulator: of: add support for parsing regulator-state-standby
Date: Tue, 13 Nov 2018 14:47:37 +0000 [thread overview]
Message-ID: <1542120469-15450-3-git-send-email-andrei.stefanescu@microchip.com> (raw)
In-Reply-To: <1542120469-15450-1-git-send-email-andrei.stefanescu@microchip.com>
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>
---
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
prev parent reply other threads:[~2018-11-13 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 14:47 [PATCH 0/2] set regulator constraints for standby state Andrei.Stefanescu
2018-11-13 14:47 ` [PATCH 1/2] regulator: dt-bindings: add regulator-state-standby bindings Andrei.Stefanescu
2018-11-13 14:47 ` Andrei.Stefanescu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1542120469-15450-3-git-send-email-andrei.stefanescu@microchip.com \
--to=andrei.stefanescu@microchip.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=Cristian.Birsan@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).