mfd: Put WM8994 into reset when suspending
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 21 Feb 2011 18:30:31 +0000 (18:30 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 23 Mar 2011 09:41:49 +0000 (10:41 +0100)
Ensure that the chip is in the lowest power mode possible when suspended
by performing a soft reset on it. On early silicon revisions the lowest
power modes can't be entered without using reset so we can't achieve
equivalent results within the individual drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm8994-core.c

index f4016a075fd611000f8f6f1059deb8631722a211..e673bda21f5de261382c282caa43446789e82594 100644 (file)
@@ -271,6 +271,11 @@ static int wm8994_suspend(struct device *dev)
        if (ret < 0)
                dev_err(dev, "Failed to save LDO registers: %d\n", ret);
 
+       /* Explicitly put the device into reset in case regulators
+        * don't get disabled in order to ensure consistent restart.
+        */
+       wm8994_reg_write(wm8994, WM8994_SOFTWARE_RESET, 0x8994);
+
        wm8994->suspended = true;
 
        ret = regulator_bulk_disable(wm8994->num_supplies,