From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
Olof Johansson <olof@lixom.net>, Chris Zhong <zyw@rock-chips.com>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Abhilash Kesavan <kesavan.abhilash@gmail.com>,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: [PATCH v3 2/5] regulator: core: Add regulator mode and initial mode properties
Date: Mon, 20 Oct 2014 16:47:49 +0200 [thread overview]
Message-ID: <1413816472-1895-3-git-send-email-javier.martinez@collabora.co.uk> (raw)
In-Reply-To: <1413816472-1895-1-git-send-email-javier.martinez@collabora.co.uk>
Some regulators can run on different operating modes (opmodes). This
allows systems to choose the most efficient opmode for each regulator.
This patch adds a "regulator-initial-mode" property to configure at
startup the operating mode for the regulators that support changing
its mode during normal operation and a "regulator-mode" to be used as
a property of the suspend states "regulator-state-[mem/disk]" nodes
for the regulators that supports changing its operating mode when the
system enters in a suspend state.
The set of possible modes that a regulator can operate depends on
the hardware capabilities so a list of generic operating modes can't
be provided. Instead, each hardware should define the list of valid
operating modes for the regulators found on that device.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
Documentation/devicetree/bindings/regulator/regulator.txt | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index aaad615..8b54be1 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -28,6 +28,20 @@ Optional properties:
- regulator-state-[mem/disk] node has following common properties:
- regulator-on-in-suspend: regulator should be on in suspend state.
- regulator-off-in-suspend: regulator should be off in suspend state.
+ - regulator-mode: operating mode in the given suspend state.
+ The set of possible operating modes depends on the capabilities of
+ every hardware so the valid modes are documented on each regulator
+ device tree binding document.
+ The "regulator-mode" property only takes effect if the regulator is
+ enabled for the given suspend state using "regulator-on-in-suspend".
+ If the regulator has not been explicitly disabled for the given state
+ with "regulator-off-in-suspend", then setting the operating mode
+ will also have no effect.
+- regulator-initial-mode: initial operating mode. The set of possible operating
+ modes is the same used for the regulator-mode property and the device binding
+ documentation explains which property each regulator supports.
+If no mode is defined, then the OS will not manage the modes and the hardware
+default values will be used instead.
Deprecated properties:
- regulator-compatible: If a regulator chip contains multiple
--
2.1.0
next prev parent reply other threads:[~2014-10-20 14:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 14:47 [PATCH v3 0/5] Add max77802 regulator operating mode support Javier Martinez Canillas
2014-10-20 14:47 ` [PATCH v3 1/5] regulator: of: Decrement refcount for suspend state nodes Javier Martinez Canillas
2014-10-22 16:38 ` Mark Brown
2014-10-20 14:47 ` Javier Martinez Canillas [this message]
2014-10-20 14:47 ` [PATCH v3 3/5] regulator: max77802: Document regulator operating modes Javier Martinez Canillas
2014-10-20 14:47 ` [PATCH v3 4/5] regulator: max77802: Parse regulator operating mode properties Javier Martinez Canillas
2014-10-22 16:48 ` Mark Brown
2014-10-23 9:28 ` Javier Martinez Canillas
2014-10-24 21:02 ` Mark Brown
2014-10-26 23:24 ` Javier Martinez Canillas
2014-10-20 14:47 ` [PATCH v3 5/5] ARM: dts: Configure regulators for suspend on exynos Peach boards Javier Martinez Canillas
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=1413816472-1895-3-git-send-email-javier.martinez@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=k.kozlowski@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=zyw@rock-chips.com \
/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®