summaryrefslogtreecommitdiff
path: root/drivers/mfd/wm8994-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-21 18:30:31 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 10:41:49 +0100
commitf40dff9edbf1daa14068542d60ae22df78e8c74a (patch)
treebb2039be7756b764ae52d3b2ea1f11ff202cb551 /drivers/mfd/wm8994-core.c
parentf66ea457f616258777cb3349f33745b0240e54fd (diff)
downloadlwn-f40dff9edbf1daa14068542d60ae22df78e8c74a.tar.gz
lwn-f40dff9edbf1daa14068542d60ae22df78e8c74a.zip
mfd: Put WM8994 into reset when suspending
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>
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
-rw-r--r--drivers/mfd/wm8994-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index f4016a075fd6..e673bda21f5d 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -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,