aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8940.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/wm8940.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/wm8940.c')
-rw-r--r--sound/soc/codecs/wm8940.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index b8e17d6bc1f7..b69210a77423 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -916,6 +916,21 @@ static int __devexit wm8940_i2c_remove(struct i2c_client *client)
916 return 0; 916 return 0;
917} 917}
918 918
919#ifdef CONFIG_PM
920static int wm8940_i2c_suspend(struct i2c_client *client, pm_message_t msg)
921{
922 return snd_soc_suspend_device(&client->dev);
923}
924
925static int wm8940_i2c_resume(struct i2c_client *client)
926{
927 return snd_soc_resume_device(&client->dev);
928}
929#else
930#define wm8940_i2c_suspend NULL
931#define wm8940_i2c_resume NULL
932#endif
933
919static const struct i2c_device_id wm8940_i2c_id[] = { 934static const struct i2c_device_id wm8940_i2c_id[] = {
920 { "wm8940", 0 }, 935 { "wm8940", 0 },
921 { } 936 { }
@@ -929,6 +944,8 @@ static struct i2c_driver wm8940_i2c_driver = {
929 }, 944 },
930 .probe = wm8940_i2c_probe, 945 .probe = wm8940_i2c_probe,
931 .remove = __devexit_p(wm8940_i2c_remove), 946 .remove = __devexit_p(wm8940_i2c_remove),
947 .suspend = wm8940_i2c_suspend,
948 .resume = wm8940_i2c_resume,
932 .id_table = wm8940_i2c_id, 949 .id_table = wm8940_i2c_id,
933}; 950};
934 951