aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8903.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/wm8903.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/wm8903.c')
-rw-r--r--sound/soc/codecs/wm8903.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 3ebd770463e3..6239af8fdf71 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1731,6 +1731,21 @@ static __devexit int wm8903_i2c_remove(struct i2c_client *client)
1731 return 0; 1731 return 0;
1732} 1732}
1733 1733
1734#ifdef CONFIG_PM
1735static int wm8903_i2c_suspend(struct i2c_client *client, pm_message_t msg)
1736{
1737 return snd_soc_suspend_device(&client->dev);
1738}
1739
1740static int wm8903_i2c_resume(struct i2c_client *client)
1741{
1742 return snd_soc_resume_device(&client->dev);
1743}
1744#else
1745#define wm8903_i2c_suspend NULL
1746#define wm8903_i2c_resume NULL
1747#endif
1748
1734/* i2c codec control layer */ 1749/* i2c codec control layer */
1735static const struct i2c_device_id wm8903_i2c_id[] = { 1750static const struct i2c_device_id wm8903_i2c_id[] = {
1736 { "wm8903", 0 }, 1751 { "wm8903", 0 },
@@ -1745,6 +1760,8 @@ static struct i2c_driver wm8903_i2c_driver = {
1745 }, 1760 },
1746 .probe = wm8903_i2c_probe, 1761 .probe = wm8903_i2c_probe,
1747 .remove = __devexit_p(wm8903_i2c_remove), 1762 .remove = __devexit_p(wm8903_i2c_remove),
1763 .suspend = wm8903_i2c_suspend,
1764 .resume = wm8903_i2c_resume,
1748 .id_table = wm8903_i2c_id, 1765 .id_table = wm8903_i2c_id,
1749}; 1766};
1750 1767