diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-17 08:16:09 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-07-30 20:04:29 -0400 |
commit | ebe38f80b290fe6d86404d0b21eae479d4aeb21f (patch) | |
tree | dd2f0f97f6b51f3cbc9da9dc7c9f012b489c0184 | |
parent | 4dd0b2ba1d8c96d18c4a5624b167e267671d047f (diff) |
mfd: wm8994: Remove check for active audio in runtime suspend
Since enabling VMID takes a runtime PM reference there is no need to
suppress suspend when doing a runtime suspend. Similarly the digital
inputs and outputs are DAPM widgets and therefore the ASoC core will
be holding a reference for them.
This used to be required when integration with system suspend was being
bodged.
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/wm8994-core.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index e8ecb8e218d7..e1c283e6d4e5 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -201,35 +201,7 @@ static int wm8994_suspend(struct device *dev) | |||
201 | int ret; | 201 | int ret; |
202 | 202 | ||
203 | /* Don't actually go through with the suspend if the CODEC is | 203 | /* Don't actually go through with the suspend if the CODEC is |
204 | * still active (eg, for audio passthrough from CP. */ | 204 | * still active for accessory detect. */ |
205 | ret = wm8994_reg_read(wm8994, WM8994_POWER_MANAGEMENT_1); | ||
206 | if (ret < 0) { | ||
207 | dev_err(dev, "Failed to read power status: %d\n", ret); | ||
208 | } else if (ret & WM8994_VMID_SEL_MASK) { | ||
209 | dev_dbg(dev, "CODEC still active, ignoring suspend\n"); | ||
210 | return 0; | ||
211 | } | ||
212 | |||
213 | ret = wm8994_reg_read(wm8994, WM8994_POWER_MANAGEMENT_4); | ||
214 | if (ret < 0) { | ||
215 | dev_err(dev, "Failed to read power status: %d\n", ret); | ||
216 | } else if (ret & (WM8994_AIF2ADCL_ENA | WM8994_AIF2ADCR_ENA | | ||
217 | WM8994_AIF1ADC2L_ENA | WM8994_AIF1ADC2R_ENA | | ||
218 | WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC1R_ENA)) { | ||
219 | dev_dbg(dev, "CODEC still active, ignoring suspend\n"); | ||
220 | return 0; | ||
221 | } | ||
222 | |||
223 | ret = wm8994_reg_read(wm8994, WM8994_POWER_MANAGEMENT_5); | ||
224 | if (ret < 0) { | ||
225 | dev_err(dev, "Failed to read power status: %d\n", ret); | ||
226 | } else if (ret & (WM8994_AIF2DACL_ENA | WM8994_AIF2DACR_ENA | | ||
227 | WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA | | ||
228 | WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA)) { | ||
229 | dev_dbg(dev, "CODEC still active, ignoring suspend\n"); | ||
230 | return 0; | ||
231 | } | ||
232 | |||
233 | switch (wm8994->type) { | 205 | switch (wm8994->type) { |
234 | case WM8958: | 206 | case WM8958: |
235 | case WM1811: | 207 | case WM1811: |