linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dianders@chromium.org (Doug Anderson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state
Date: Fri, 31 Oct 2014 20:52:58 -0700	[thread overview]
Message-ID: <1414813978-32233-2-git-send-email-dianders@chromium.org> (raw)
In-Reply-To: <1414813978-32233-1-git-send-email-dianders@chromium.org>

Leverage all the work that was done in (40e20d6 regulator: of: Add
support for parsing regulator_state for suspend state) and throw in
the ability to set suspend microvolts from the device tree.

Signed-off-by: Doug Anderson <dianders@chromium.org>
---
 drivers/regulator/of_regulator.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index f0d19fc..7fe93c5 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np,
 					"regulator-off-in-suspend"))
 			suspend_state->disabled = true;
 
+		if (!of_property_read_u32(suspend_np,
+					"regulator-suspend-microvolt", &pval))
+			suspend_state->uV = pval;
+
 		of_node_put(suspend_np);
 		suspend_state = NULL;
 		suspend_np = NULL;
-- 
2.1.0.rc2.206.gedb03e5

  reply	other threads:[~2014-11-01  3:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-01  3:52 [PATCH 1/2] regulator: Document binding for regulator suspend voltage Doug Anderson
2014-11-01  3:52 ` Doug Anderson [this message]
2014-11-01  8:49   ` [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state Javier Martinez Canillas
2014-11-03  0:27     ` Chris Zhong
2014-11-03 12:29     ` Mark Brown
2014-11-03 12:45       ` Javier Martinez Canillas
2014-11-03 12:47         ` Mark Brown
2014-11-01  8:45 ` [PATCH 1/2] regulator: Document binding for regulator suspend voltage Javier Martinez Canillas
2014-11-03  0:27   ` Chris Zhong
2014-11-03 12:29 ` Mark Brown

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=1414813978-32233-2-git-send-email-dianders@chromium.org \
    --to=dianders@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.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).