From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>
Subject: [PATCH RFT 2/3] regulator: wm831x-dcdc: Add dummy set_suspend_[enable|disable] callbacks implementation
Date: Fri, 13 Apr 2012 12:42:51 +0800 [thread overview]
Message-ID: <1334292171.6122.2.camel@phoenix> (raw)
In-Reply-To: <1334292098.6122.1.camel@phoenix>
Without the implementation of set_suspend_enable and set_suspend_disable callbacks,
the regulator core won't call set_suspend_voltage and set_suspend_mode.
Thus add dummy implementation for set_suspend_[enable|disable] callbacks.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/wm831x-dcdc.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index f0da23c..c9e52a8 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -406,11 +406,21 @@ static int wm831x_buckv_get_current_limit(struct regulator_dev *rdev)
return wm831x_dcdc_ilim[val];
}
+/* Dummy set_suspend_enable/set_suspend_disable callbacks implementation */
+static int wm831x_buckv_set_suspend_enable(struct regulator_dev *rdev)
+{
+ return 0;
+}
+
+static int wm831x_buckv_set_suspend_disable(struct regulator_dev *rdev)
+{
+ return 0;
+}
+
static struct regulator_ops wm831x_buckv_ops = {
.set_voltage = wm831x_buckv_set_voltage,
.get_voltage_sel = wm831x_buckv_get_voltage_sel,
.list_voltage = wm831x_buckv_list_voltage,
- .set_suspend_voltage = wm831x_buckv_set_suspend_voltage,
.set_current_limit = wm831x_buckv_set_current_limit,
.get_current_limit = wm831x_buckv_get_current_limit,
@@ -420,6 +430,10 @@ static struct regulator_ops wm831x_buckv_ops = {
.get_status = wm831x_dcdc_get_status,
.get_mode = wm831x_dcdc_get_mode,
.set_mode = wm831x_dcdc_set_mode,
+
+ .set_suspend_enable = wm831x_buckv_set_suspend_enable,
+ .set_suspend_disable = wm831x_buckv_set_suspend_disable,
+ .set_suspend_voltage = wm831x_buckv_set_suspend_voltage,
.set_suspend_mode = wm831x_dcdc_set_suspend_mode,
};
--
1.7.5.4
next prev parent reply other threads:[~2012-04-13 4:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 4:41 [PATCH RFT 1/3] regulator: ab3100: Add dummy set_suspend_[enable|disable] callbacks implementation Axel Lin
2012-04-13 4:42 ` Axel Lin [this message]
2012-04-13 4:43 ` [PATCH RFT 3/3] regulator: wm831x-ldo: " Axel Lin
2012-04-13 8:16 ` [PATCH RFT 1/3] regulator: ab3100: " 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=1334292171.6122.2.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.