mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mfd: wm8994: Don't use system PM operations
@ 2013-03-22 11:40 Mark Brown
  2013-04-09  8:22 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-03-22 11:40 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, patches, Mark Brown

For realistic systems the power management is controlled entirely via
runtime PM - if the device is not runtime suspended then the suspend
will abort without doing anything as functionality such as accessory
detection or audio bypass will require the device to be enabled while
if the device is runtime suspended it is already in the lowest power
state. This means that system suspend is redundant and can be removed
which avoids issues with attempting to double disable the regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mfd/wm8994-core.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index 803e93f..8737a47 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -191,7 +191,7 @@ static const char *wm8958_main_supplies[] = {
 	"SPKVDD2",
 };
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_RUNTIME
 static int wm8994_suspend(struct device *dev)
 {
 	struct wm8994 *wm8994 = dev_get_drvdata(dev);
@@ -724,8 +724,9 @@ static const struct i2c_device_id wm8994_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, wm8994_i2c_id);
 
-static UNIVERSAL_DEV_PM_OPS(wm8994_pm_ops, wm8994_suspend, wm8994_resume,
-			    NULL);
+static const struct dev_pm_ops wm8994_pm_ops = {
+	SET_RUNTIME_PM_OPS(wm8994_suspend, wm8994_resume, NULL)
+};
 
 static struct i2c_driver wm8994_i2c_driver = {
 	.driver = {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: wm8994: Don't use system PM operations
  2013-03-22 11:40 [PATCH] mfd: wm8994: Don't use system PM operations Mark Brown
@ 2013-04-09  8:22 ` Samuel Ortiz
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2013-04-09  8:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, patches

Hi Mark,

On Fri, Mar 22, 2013 at 12:40:22PM +0100, Mark Brown wrote:
> For realistic systems the power management is controlled entirely via
> runtime PM - if the device is not runtime suspended then the suspend
> will abort without doing anything as functionality such as accessory
> detection or audio bypass will require the device to be enabled while
> if the device is runtime suspended it is already in the lowest power
> state. This means that system suspend is redundant and can be removed
> which avoids issues with attempting to double disable the regulators.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/mfd/wm8994-core.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
Applied, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-09  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 11:40 [PATCH] mfd: wm8994: Don't use system PM operations Mark Brown
2013-04-09  8:22 ` Samuel Ortiz

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®