* [PATCH RFT 1/3] regulator: ab3100: Add dummy set_suspend_[enable|disable] callbacks implementation
@ 2012-04-13 4:41 Axel Lin
2012-04-13 4:42 ` [PATCH RFT 2/3] regulator: wm831x-dcdc: " Axel Lin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2012-04-13 4:41 UTC (permalink / raw)
To: linux-kernel; +Cc: Linus Walleij, Mark Brown, Liam Girdwood
Without the implementation of set_suspend_enable and set_suspend_disable callbacks,
the regulator core won't call set_suspend_voltage.
Thus add dummy implementation for set_suspend_[enable|disable] callbacks.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/ab3100.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index ce61925..b08d92b 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -367,6 +367,17 @@ static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg,
return err;
}
+/* Dummy set_suspend_enable/set_suspend_disable callbacks implementation */
+static int ab3100_set_suspend_enable(struct regulator_dev *rdev)
+{
+ return 0;
+}
+
+static int ab3100_set_suspend_disable(struct regulator_dev *rdev)
+{
+ return 0;
+}
+
static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg,
int uV)
{
@@ -467,9 +478,12 @@ static struct regulator_ops regulator_ops_variable_sleepable = {
.is_enabled = ab3100_is_enabled_regulator,
.get_voltage = ab3100_get_voltage_regulator,
.set_voltage_sel = ab3100_set_voltage_regulator_sel,
- .set_suspend_voltage = ab3100_set_suspend_voltage_regulator,
.list_voltage = ab3100_list_voltage_regulator,
.enable_time = ab3100_enable_time_regulator,
+
+ .set_suspend_enable = ab3100_set_suspend_enable,
+ .set_suspend_disable = ab3100_set_suspend_disable,
+ .set_suspend_voltage = ab3100_set_suspend_voltage_regulator,
};
/*
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RFT 2/3] regulator: wm831x-dcdc: Add dummy set_suspend_[enable|disable] callbacks implementation
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
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
2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2012-04-13 4:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown, Liam Girdwood
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RFT 3/3] regulator: wm831x-ldo: Add dummy set_suspend_[enable|disable] callbacks implementation
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 ` [PATCH RFT 2/3] regulator: wm831x-dcdc: " Axel Lin
@ 2012-04-13 4:43 ` Axel Lin
2012-04-13 8:16 ` [PATCH RFT 1/3] regulator: ab3100: " Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2012-04-13 4:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown, Liam Girdwood
Without the implementation of set_suspend_enable and set_suspend_disable callbacks,
the regulator core won't call set_suspend_voltage.
Thus add dummy implementation for set_suspend_[enable|disable] callbacks.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/wm831x-ldo.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 5f01040..f777f9b 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -291,11 +291,21 @@ static unsigned int wm831x_gp_ldo_get_optimum_mode(struct regulator_dev *rdev,
}
+/* Dummy set_suspend_enable/set_suspend_disable callbacks implementation */
+static int wm831x_gp_ldo_set_suspend_enable(struct regulator_dev *rdev)
+{
+ return 0;
+}
+
+static int wm831x_gp_ldo_set_suspend_disable(struct regulator_dev *rdev)
+{
+ return 0;
+}
+
static struct regulator_ops wm831x_gp_ldo_ops = {
.list_voltage = wm831x_gp_ldo_list_voltage,
.get_voltage_sel = wm831x_gp_ldo_get_voltage_sel,
.set_voltage = wm831x_gp_ldo_set_voltage,
- .set_suspend_voltage = wm831x_gp_ldo_set_suspend_voltage,
.get_mode = wm831x_gp_ldo_get_mode,
.set_mode = wm831x_gp_ldo_set_mode,
.get_status = wm831x_gp_ldo_get_status,
@@ -304,6 +314,10 @@ static struct regulator_ops wm831x_gp_ldo_ops = {
.is_enabled = wm831x_ldo_is_enabled,
.enable = wm831x_ldo_enable,
.disable = wm831x_ldo_disable,
+
+ .set_suspend_enable = wm831x_gp_ldo_set_suspend_enable,
+ .set_suspend_disable = wm831x_gp_ldo_set_suspend_disable,
+ .set_suspend_voltage = wm831x_gp_ldo_set_suspend_voltage,
};
static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFT 1/3] regulator: ab3100: Add dummy set_suspend_[enable|disable] callbacks implementation
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 ` [PATCH RFT 2/3] regulator: wm831x-dcdc: " Axel Lin
2012-04-13 4:43 ` [PATCH RFT 3/3] regulator: wm831x-ldo: " Axel Lin
@ 2012-04-13 8:16 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-04-13 8:16 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Linus Walleij, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
On Fri, Apr 13, 2012 at 12:41:38PM +0800, Axel Lin wrote:
> Without the implementation of set_suspend_enable and set_suspend_disable callbacks,
> the regulator core won't call set_suspend_voltage.
>
> Thus add dummy implementation for set_suspend_[enable|disable] callbacks.
No, if we need to go adding dummy functions to a bunch of drivers we're
clearly going about things the wrong way and should be avoiding the need
to have those functions in the first place.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-13 8:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH RFT 2/3] regulator: wm831x-dcdc: " Axel Lin
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox