diff options
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
-rw-r--r-- | drivers/mfd/wm8994-core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index f117e7fb9321..a04b3c108c8c 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -256,6 +256,20 @@ static int wm8994_suspend(struct device *dev) | |||
256 | break; | 256 | break; |
257 | } | 257 | } |
258 | 258 | ||
259 | switch (wm8994->type) { | ||
260 | case WM1811: | ||
261 | ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2); | ||
262 | if (ret < 0) { | ||
263 | dev_err(dev, "Failed to read jackdet: %d\n", ret); | ||
264 | } else if (ret & WM1811_JACKDET_MODE_MASK) { | ||
265 | dev_dbg(dev, "CODEC still active, ignoring suspend\n"); | ||
266 | return 0; | ||
267 | } | ||
268 | break; | ||
269 | default: | ||
270 | break; | ||
271 | } | ||
272 | |||
259 | /* Disable LDO pulldowns while the device is suspended if we | 273 | /* Disable LDO pulldowns while the device is suspended if we |
260 | * don't know that something will be driving them. */ | 274 | * don't know that something will be driving them. */ |
261 | if (!wm8994->ldo_ena_always_driven) | 275 | if (!wm8994->ldo_ena_always_driven) |