From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>,
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 3/9] regulator: max77802: Split regulator operations for BUCKs
Date: Wed, 15 Oct 2014 18:20:33 +0200 [thread overview]
Message-ID: <1413390039-19364-4-git-send-email-javier.martinez@collabora.co.uk> (raw)
In-Reply-To: <1413390039-19364-1-git-send-email-javier.martinez@collabora.co.uk>
Not all the max77802 BUCKs regulators have the same functionality, for
example BUCKs 2-4 support the output to be configured as normal or Low
Power Mode by the PWRREQ enable pin while the other BUCKs only support
their output to be set ON or OFF by PWRREQ. As a preparation for adding
a set_suspend_mode function handler for all the regulators that support
Low Power Mode by PWRREQ, split the operations for BUCKs regulators.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
drivers/regulator/max77802.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c
index baf834d..a621700 100644
--- a/drivers/regulator/max77802.c
+++ b/drivers/regulator/max77802.c
@@ -330,7 +330,22 @@ static struct regulator_ops max77802_buck_16_dvs_ops = {
.set_suspend_disable = max77802_set_suspend_disable,
};
-/* BUCKs 2-4, 5, 7-10 */
+/* BUCKs 2-4 */
+static struct regulator_ops max77802_buck_234_ops = {
+ .list_voltage = regulator_list_voltage_linear,
+ .map_voltage = regulator_map_voltage_linear,
+ .is_enabled = regulator_is_enabled_regmap,
+ .enable = max77802_enable,
+ .disable = regulator_disable_regmap,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .set_ramp_delay = max77802_set_ramp_delay_2bit,
+ .set_suspend_enable = max77802_enable,
+ .set_suspend_disable = max77802_set_suspend_disable,
+};
+
+/* BUCKs 5, 7-10 */
static struct regulator_ops max77802_buck_dvs_ops = {
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
@@ -404,7 +419,7 @@ static struct regulator_ops max77802_buck_dvs_ops = {
.name = "BUCK"#num, \
.id = MAX77802_BUCK##num, \
.supply_name = "inb"#num, \
- .ops = &max77802_buck_dvs_ops, \
+ .ops = &max77802_buck_234_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = 600000, \
--
2.1.0
next prev parent reply other threads:[~2014-10-15 16:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 16:20 [PATCH 0/9] Add max77802 regulator operating mode support Javier Martinez Canillas
[not found] ` <1413390039-19364-1-git-send-email-javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-10-15 16:20 ` [PATCH 1/9] regulator: max77802: Add .set_suspend_{enable,disable} callbacks Javier Martinez Canillas
2014-10-16 8:37 ` Mark Brown
2014-10-15 16:20 ` [PATCH 2/9] regulator: max77802: Add .{get,set}_mode callbacks Javier Martinez Canillas
2014-10-16 8:36 ` Mark Brown
2014-10-16 10:24 ` Javier Martinez Canillas
2014-10-15 16:20 ` Javier Martinez Canillas [this message]
2014-10-16 8:38 ` [PATCH 3/9] regulator: max77802: Split regulator operations for BUCKs Mark Brown
2014-10-15 16:20 ` [PATCH 4/9] regulator: max77802: Add set suspend mode for BUCKs and simplify code Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 5/9] regulator: max77802: Don't treat OFF as an operating mode Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 6/9] regulator: max77802: Add header for operating modes Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 7/9] regulator: max77802: Document regulator opmode DT properties Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 8/9] regulator: max77802: Parse regulator operating mode properties Javier Martinez Canillas
2014-10-15 16:20 ` [PATCH 9/9] 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=1413390039-19364-4-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=dianders@chromium.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;
as well as URLs for NNTP newsgroup(s).