Thread (28 messages) flat view 28 messages, 8 authors, 2013-09-13
STALE4746d

[PATCH v2 6/9] mfd: wm8994: convert to use I2C core runtime PM

From: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: 2013-09-11 15:32:59
Also in: linux-acpi, linux-arm-kernel, lkml
Subsystem: multifunction devices (mfd), the rest, wolfson microelectronics drivers · Maintainers: Lee Jones, Linus Torvalds

The I2C core now prepares runtime PM on behalf of the I2C client device, so
only thing the driver needs to do is to call pm_runtime_put() at the end of
its ->probe().

This patch converts wm8994 driver to use this model.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/mfd/wm8994-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index 3fdee90..9928bb1 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -706,8 +706,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
 		goto err_irq;
 	}
 
-	pm_runtime_enable(wm8994->dev);
-	pm_runtime_idle(wm8994->dev);
+	pm_runtime_put(wm8994->dev);
 
 	return 0;
 
@@ -723,7 +722,7 @@ err:
 
 static void wm8994_device_exit(struct wm8994 *wm8994)
 {
-	pm_runtime_disable(wm8994->dev);
+	pm_runtime_get(wm8994->dev);
 	mfd_remove_devices(wm8994->dev);
 	wm8994_irq_exit(wm8994);
 	regulator_bulk_disable(wm8994->num_supplies,
-- 
1.8.4.rc3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help