diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-06-13 17:30:18 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-06-13 17:30:18 -0400 |
commit | b3b50b3f31775be5d2e441618bbc1c5cbee4d9f1 (patch) | |
tree | 22171b96e3138fcea12f9845bc3f26358c7bfa6a /sound/soc/codecs/wm8350.c | |
parent | 831dc0f10f7b2a4856094ff160c018bf19f77527 (diff) |
ASoC: Add suspend and resume callbacks to Wolfson CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8350.c')
-rw-r--r-- | sound/soc/codecs/wm8350.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index f6bb59951f96..4ded0e3a35e0 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -1671,6 +1671,21 @@ static int __devexit wm8350_codec_remove(struct platform_device *pdev) | |||
1671 | return 0; | 1671 | return 0; |
1672 | } | 1672 | } |
1673 | 1673 | ||
1674 | #ifdef CONFIG_PM | ||
1675 | static int wm8350_codec_suspend(struct platform_device *pdev, pm_message_t m) | ||
1676 | { | ||
1677 | return snd_soc_suspend_device(&pdev->dev); | ||
1678 | } | ||
1679 | |||
1680 | static int wm8350_codec_resume(struct platform_device *pdev) | ||
1681 | { | ||
1682 | return snd_soc_resume_device(&pdev->dev); | ||
1683 | } | ||
1684 | #else | ||
1685 | #define wm8350_codec_suspend NULL | ||
1686 | #define wm8350_codec_resume NULL | ||
1687 | #endif | ||
1688 | |||
1674 | static struct platform_driver wm8350_codec_driver = { | 1689 | static struct platform_driver wm8350_codec_driver = { |
1675 | .driver = { | 1690 | .driver = { |
1676 | .name = "wm8350-codec", | 1691 | .name = "wm8350-codec", |
@@ -1678,6 +1693,8 @@ static struct platform_driver wm8350_codec_driver = { | |||
1678 | }, | 1693 | }, |
1679 | .probe = wm8350_codec_probe, | 1694 | .probe = wm8350_codec_probe, |
1680 | .remove = __devexit_p(wm8350_codec_remove), | 1695 | .remove = __devexit_p(wm8350_codec_remove), |
1696 | .suspend = wm8350_codec_suspend, | ||
1697 | .resume = wm8350_codec_resume, | ||
1681 | }; | 1698 | }; |
1682 | 1699 | ||
1683 | static __init int wm8350_init(void) | 1700 | static __init int wm8350_init(void) |