Commit 1a2017b7 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Also restore wm8994 GPIO IRQ masks after reset

This ensures that if we are using a GPIO as a wake source it continues to
function while we're suspended.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ed393dcd
...@@ -293,6 +293,13 @@ static int wm8994_suspend(struct device *dev) ...@@ -293,6 +293,13 @@ static int wm8994_suspend(struct device *dev)
if (ret != 0) if (ret != 0)
dev_err(dev, "Failed to restore GPIO registers: %d\n", ret); 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); regcache_cache_only(wm8994->regmap, true);
wm8994->suspended = true; wm8994->suspended = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment