Skip to content

Commit

Permalink
mfd: Also restore wm8994 GPIO IRQ masks after reset
Browse files Browse the repository at this point in the history
This ensures that if we are using a GPIO as a wake source it continues to
function while we're suspended.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jul 8, 2012
1 parent ed393dc commit 1a2017b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static int wm8994_suspend(struct device *dev)
if (ret != 0)
dev_err(dev, "Failed to restore GPIO registers: %d\n", ret);

/* In case one of the GPIOs is used as a wake input. */
ret = regcache_sync_region(wm8994->regmap,
WM8994_INTERRUPT_STATUS_1_MASK,
WM8994_INTERRUPT_STATUS_1_MASK);
if (ret != 0)
dev_err(dev, "Failed to restore interrupt mask: %d\n", ret);

regcache_cache_only(wm8994->regmap, true);
wm8994->suspended = true;

Expand Down

0 comments on commit 1a2017b

Please sign in to comment.