diff options
| -rw-r--r-- | sound/soc/codecs/max98090.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index be86094817eb..2888f632564a 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c | |||
| @@ -2392,9 +2392,32 @@ static int max98090_runtime_suspend(struct device *dev) | |||
| 2392 | } | 2392 | } |
| 2393 | #endif | 2393 | #endif |
| 2394 | 2394 | ||
| 2395 | #ifdef CONFIG_PM | ||
| 2396 | static int max98090_resume(struct device *dev) | ||
| 2397 | { | ||
| 2398 | struct max98090_priv *max98090 = dev_get_drvdata(dev); | ||
| 2399 | unsigned int status; | ||
| 2400 | |||
| 2401 | max98090_reset(max98090); | ||
| 2402 | |||
| 2403 | /* clear IRQ status */ | ||
| 2404 | regmap_read(max98090->regmap, M98090_REG_DEVICE_STATUS, &status); | ||
| 2405 | |||
| 2406 | regcache_sync(max98090->regmap); | ||
| 2407 | |||
| 2408 | return 0; | ||
| 2409 | } | ||
| 2410 | |||
| 2411 | static int max98090_suspend(struct device *dev) | ||
| 2412 | { | ||
| 2413 | return 0; | ||
| 2414 | } | ||
| 2415 | #endif | ||
| 2416 | |||
| 2395 | static const struct dev_pm_ops max98090_pm = { | 2417 | static const struct dev_pm_ops max98090_pm = { |
| 2396 | SET_RUNTIME_PM_OPS(max98090_runtime_suspend, | 2418 | SET_RUNTIME_PM_OPS(max98090_runtime_suspend, |
| 2397 | max98090_runtime_resume, NULL) | 2419 | max98090_runtime_resume, NULL) |
| 2420 | SET_SYSTEM_SLEEP_PM_OPS(max98090_suspend, max98090_resume) | ||
| 2398 | }; | 2421 | }; |
| 2399 | 2422 | ||
| 2400 | static const struct i2c_device_id max98090_i2c_id[] = { | 2423 | static const struct i2c_device_id max98090_i2c_id[] = { |
