diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-04 17:10:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-04 17:10:06 -0800 |
commit | a5939eefdcacd3ece57d56167a43bcc0d93733bf (patch) | |
tree | f3a11477ce45acde4db4ff4ba673cd5a85e573f9 /drivers/mfd/wm8994-core.c | |
parent | 5483f18e986ed5267b923bec12b407845181350b (diff) | |
parent | ac5ff1b358ab6813654fea69e739bf0a66c1b002 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
MFD fixes from Samuel Ortiz:
"This is the pull request for the MFD fixes for 3.3. We have a few
NULL pointer dereferences fixes, an ACPI conflict check fix, and a
couple of wm8994 fixes."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Correct readability of WM8994 DC servo 4E register
mfd: Initialize tps65912 irq platform data properly
mfd: Fix ACPI conflict check
mfd: Fix ab8500 error path bug
mfd: Test for jack detection when deciding if wm8994 should suspend
mfd: Initialize tps65910 irq platform data properly
mfd: Fix possible s5m null pointer dereference
mfd: wm8350 variable dereferenced before check
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 f117e7fb932..a04b3c108c8 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -256,6 +256,20 @@ static int wm8994_suspend(struct device *dev) break; } + switch (wm8994->type) { + case WM1811: + ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2); + if (ret < 0) { + dev_err(dev, "Failed to read jackdet: %d\n", ret); + } else if (ret & WM1811_JACKDET_MODE_MASK) { + dev_dbg(dev, "CODEC still active, ignoring suspend\n"); + return 0; + } + break; + default: + break; + } + /* Disable LDO pulldowns while the device is suspended if we * don't know that something will be driving them. */ if (!wm8994->ldo_ena_always_driven) |