Skip to contentSkip to conversation

mfd: wm8994: Don't use system PM operations

PATCH Applied Mark Brown 2 participants 2 messages Mar 22, 2013 – Apr 9, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: wm8994: Don't use system PM operations

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.

---
 drivers/mfd/wm8994-core.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mfd/wm8994-core.c +4 -3
index 803e93f..8737a47 100644
@@ -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 = {
Signature · 1 line
1.7.10.4
Applied
#1 lore raw

Hi Mark,

Quoted 8 lines · 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.

Quoted 4 lines
---
 drivers/mfd/wm8994-core.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/