mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
To: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
	Andy Gross <agross@codeaurora.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-msm@vger.kernel.org>
Subject: [PATCH v2 2/5] regulator: Introduce property to flag drms
Date: Wed, 1 Apr 2015 15:55:43 -0700	[thread overview]
Message-ID: <1427928946-31291-3-git-send-email-bjorn.andersson@sonymobile.com> (raw)
In-Reply-To: <1427928946-31291-1-git-send-email-bjorn.andersson@sonymobile.com>

Introduce "regulator-allow-drms" to make it possible for board
configuration to enable drms for regulators.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
 Documentation/devicetree/bindings/regulator/regulator.txt | 1 +
 drivers/regulator/of_regulator.c                          | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index abb26b5..a2377cb 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -10,6 +10,7 @@ Optional properties:
 - regulator-always-on: boolean, regulator should never be disabled
 - regulator-boot-on: bootloader/firmware enabled regulator
 - regulator-allow-bypass: allow the regulator to go into bypass mode
+- regulator-allow-drms: allow dynamic regulator mode switching
 - <name>-supply: phandle to the parent supply/regulator node
 - regulator-ramp-delay: ramp delay for regulator(in uV/uS)
   For hardware which supports disabling ramp rate, it should be explicitly
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 24e812c..bb52532 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -70,6 +70,9 @@ static void of_get_regulation_constraints(struct device_node *np,
 	if (of_property_read_bool(np, "regulator-allow-bypass"))
 		constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS;
 
+	if (of_property_read_bool(np, "regulator-allow-drms"))
+		constraints->valid_ops_mask |= REGULATOR_CHANGE_DRMS;
+
 	ret = of_property_read_u32(np, "regulator-ramp-delay", &pval);
 	if (!ret) {
 		if (pval)
-- 
1.8.2.2


  parent reply	other threads:[~2015-04-01 22:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 22:55 [PATCH v2 0/5] Refactor Qualcomm RPM regulator to single platform_device Bjorn Andersson
2015-04-01 22:55 ` [PATCH v2 1/5] mfd: devicetree: bindings: Add Qualcomm RPM regulator subnodes Bjorn Andersson
2015-04-02  7:18   ` Lee Jones
2015-04-02 22:02   ` Stephen Boyd
2015-04-01 22:55 ` Bjorn Andersson [this message]
2015-04-02  8:54   ` [PATCH v2 2/5] regulator: Introduce property to flag drms Mark Brown
2015-04-02 21:35     ` Bjorn Andersson
2015-04-06 17:57       ` Mark Brown
2015-04-01 22:55 ` [PATCH v2 3/5] regulator: qcom: Don't enable DRMS in driver Bjorn Andersson
2015-04-02 22:02   ` Stephen Boyd
2015-04-01 22:55 ` [PATCH v2 4/5] regulator: qcom: Refactor of-parsing code Bjorn Andersson
2015-04-02 22:58   ` Stephen Boyd
2015-04-01 22:55 ` [PATCH v2 5/5] regulator: qcom: Rework to single platform device Bjorn Andersson
2015-04-02 23:02   ` Stephen Boyd
2015-04-06 16:59     ` Bjorn Andersson
2015-04-02 22:00 ` [PATCH v2 0/5] Refactor Qualcomm RPM regulator to single platform_device Stephen Boyd
2015-04-02 22:26   ` Mark Brown
2015-04-02 22:57     ` Stephen Boyd
2015-04-06 16:40       ` Bjorn Andersson
2015-04-06 16:51       ` Mark Brown
2015-04-06 17:11         ` Bjorn Andersson
2015-04-06 17:46           ` 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=1427928946-31291-3-git-send-email-bjorn.andersson@sonymobile.com \
    --to=bjorn.andersson@sonymobile.com \
    --cc=agross@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.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

all inboxes | Powered by JetHome®