aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8400.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-13 17:30:18 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-13 17:30:18 -0400
commitb3b50b3f31775be5d2e441618bbc1c5cbee4d9f1 (patch)
tree22171b96e3138fcea12f9845bc3f26358c7bfa6a /sound/soc/codecs/wm8400.c
parent831dc0f10f7b2a4856094ff160c018bf19f77527 (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/wm8400.c')
-rw-r--r--sound/soc/codecs/wm8400.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 502eefac1ecd..0bf903f27564 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -1553,6 +1553,21 @@ static int __exit wm8400_codec_remove(struct platform_device *dev)
1553 return 0; 1553 return 0;
1554} 1554}
1555 1555
1556#ifdef CONFIG_PM
1557static int wm8400_pdev_suspend(struct platform_device *pdev, pm_message_t msg)
1558{
1559 return snd_soc_suspend_device(&pdev->dev);
1560}
1561
1562static int wm8400_pdev_resume(struct platform_device *pdev)
1563{
1564 return snd_soc_resume_device(&pdev->dev);
1565}
1566#else
1567#define wm8400_pdev_suspend NULL
1568#define wm8400_pdev_resume NULL
1569#endif
1570
1556static struct platform_driver wm8400_codec_driver = { 1571static struct platform_driver wm8400_codec_driver = {
1557 .driver = { 1572 .driver = {
1558 .name = "wm8400-codec", 1573 .name = "wm8400-codec",
@@ -1560,6 +1575,8 @@ static struct platform_driver wm8400_codec_driver = {
1560 }, 1575 },
1561 .probe = wm8400_codec_probe, 1576 .probe = wm8400_codec_probe,
1562 .remove = __exit_p(wm8400_codec_remove), 1577 .remove = __exit_p(wm8400_codec_remove),
1578 .suspend = wm8400_pdev_suspend,
1579 .resume = wm8400_pdev_resume,
1563}; 1580};
1564 1581
1565static int __init wm8400_codec_init(void) 1582static int __init wm8400_codec_init(void)