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 | |
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')
-rw-r--r-- | sound/soc/codecs/wm8350.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8400.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8580.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8731.c | 39 | ||||
-rw-r--r-- | sound/soc/codecs/wm8753.c | 35 | ||||
-rw-r--r-- | sound/soc/codecs/wm8900.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8903.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8940.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8960.c | 17 | ||||
-rw-r--r-- | sound/soc/codecs/wm8988.c | 34 | ||||
-rw-r--r-- | sound/soc/codecs/wm9081.c | 17 |
11 files changed, 244 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) |
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 | ||
1557 | static int wm8400_pdev_suspend(struct platform_device *pdev, pm_message_t msg) | ||
1558 | { | ||
1559 | return snd_soc_suspend_device(&pdev->dev); | ||
1560 | } | ||
1561 | |||
1562 | static 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 | |||
1556 | static struct platform_driver wm8400_codec_driver = { | 1571 | static 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 | ||
1565 | static int __init wm8400_codec_init(void) | 1582 | static int __init wm8400_codec_init(void) |
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 86c4b24db817..261ef101d4fc 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -995,6 +995,21 @@ static int wm8580_i2c_remove(struct i2c_client *client) | |||
995 | return 0; | 995 | return 0; |
996 | } | 996 | } |
997 | 997 | ||
998 | #ifdef CONFIG_PM | ||
999 | static int wm8580_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1000 | { | ||
1001 | return snd_soc_suspend_device(&client->dev); | ||
1002 | } | ||
1003 | |||
1004 | static int wm8580_i2c_resume(struct i2c_client *client) | ||
1005 | { | ||
1006 | return snd_soc_resume_device(&client->dev); | ||
1007 | } | ||
1008 | #else | ||
1009 | #define wm8580_i2c_suspend NULL | ||
1010 | #define wm8580_i2c_resume NULL | ||
1011 | #endif | ||
1012 | |||
998 | static const struct i2c_device_id wm8580_i2c_id[] = { | 1013 | static const struct i2c_device_id wm8580_i2c_id[] = { |
999 | { "wm8580", 0 }, | 1014 | { "wm8580", 0 }, |
1000 | { } | 1015 | { } |
@@ -1008,6 +1023,8 @@ static struct i2c_driver wm8580_i2c_driver = { | |||
1008 | }, | 1023 | }, |
1009 | .probe = wm8580_i2c_probe, | 1024 | .probe = wm8580_i2c_probe, |
1010 | .remove = wm8580_i2c_remove, | 1025 | .remove = wm8580_i2c_remove, |
1026 | .suspend = wm8580_i2c_suspend, | ||
1027 | .resume = wm8580_i2c_resume, | ||
1011 | .id_table = wm8580_i2c_id, | 1028 | .id_table = wm8580_i2c_id, |
1012 | }; | 1029 | }; |
1013 | #endif | 1030 | #endif |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 7a205876ef4f..d7f4788f7ace 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -460,6 +460,7 @@ struct snd_soc_dai wm8731_dai = { | |||
460 | }; | 460 | }; |
461 | EXPORT_SYMBOL_GPL(wm8731_dai); | 461 | EXPORT_SYMBOL_GPL(wm8731_dai); |
462 | 462 | ||
463 | #ifdef CONFIG_PM | ||
463 | static int wm8731_suspend(struct platform_device *pdev, pm_message_t state) | 464 | static int wm8731_suspend(struct platform_device *pdev, pm_message_t state) |
464 | { | 465 | { |
465 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 466 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
@@ -488,6 +489,10 @@ static int wm8731_resume(struct platform_device *pdev) | |||
488 | wm8731_set_bias_level(codec, codec->suspend_bias_level); | 489 | wm8731_set_bias_level(codec, codec->suspend_bias_level); |
489 | return 0; | 490 | return 0; |
490 | } | 491 | } |
492 | #else | ||
493 | #define wm8731_suspend NULL | ||
494 | #define wm8731_resume NULL | ||
495 | #endif | ||
491 | 496 | ||
492 | static int wm8731_probe(struct platform_device *pdev) | 497 | static int wm8731_probe(struct platform_device *pdev) |
493 | { | 498 | { |
@@ -680,6 +685,21 @@ static int __devexit wm8731_spi_remove(struct spi_device *spi) | |||
680 | return 0; | 685 | return 0; |
681 | } | 686 | } |
682 | 687 | ||
688 | #ifdef CONFIG_PM | ||
689 | static int wm8731_spi_suspend(struct spi_device *spi, pm_message_t msg) | ||
690 | { | ||
691 | return snd_soc_suspend_device(&spi->dev); | ||
692 | } | ||
693 | |||
694 | static int wm8731_spi_resume(struct spi_device *spi) | ||
695 | { | ||
696 | return snd_soc_resume_device(&spi->dev); | ||
697 | } | ||
698 | #else | ||
699 | #define wm8731_spi_suspend NULL | ||
700 | #define wm8731_spi_resume NULL | ||
701 | #endif | ||
702 | |||
683 | static struct spi_driver wm8731_spi_driver = { | 703 | static struct spi_driver wm8731_spi_driver = { |
684 | .driver = { | 704 | .driver = { |
685 | .name = "wm8731", | 705 | .name = "wm8731", |
@@ -687,6 +707,8 @@ static struct spi_driver wm8731_spi_driver = { | |||
687 | .owner = THIS_MODULE, | 707 | .owner = THIS_MODULE, |
688 | }, | 708 | }, |
689 | .probe = wm8731_spi_probe, | 709 | .probe = wm8731_spi_probe, |
710 | .suspend = wm8731_spi_suspend, | ||
711 | .resume = wm8731_spi_resume, | ||
690 | .remove = __devexit_p(wm8731_spi_remove), | 712 | .remove = __devexit_p(wm8731_spi_remove), |
691 | }; | 713 | }; |
692 | #endif /* CONFIG_SPI_MASTER */ | 714 | #endif /* CONFIG_SPI_MASTER */ |
@@ -720,6 +742,21 @@ static __devexit int wm8731_i2c_remove(struct i2c_client *client) | |||
720 | return 0; | 742 | return 0; |
721 | } | 743 | } |
722 | 744 | ||
745 | #ifdef CONFIG_PM | ||
746 | static int wm8731_i2c_suspend(struct i2c_client *i2c, pm_message_t msg) | ||
747 | { | ||
748 | return snd_soc_suspend_device(&i2c->dev); | ||
749 | } | ||
750 | |||
751 | static int wm8731_i2c_resume(struct i2c_client *i2c) | ||
752 | { | ||
753 | return snd_soc_resume_device(&i2c->dev); | ||
754 | } | ||
755 | #else | ||
756 | #define wm8731_i2c_suspend NULL | ||
757 | #define wm8731_i2c_resume NULL | ||
758 | #endif | ||
759 | |||
723 | static const struct i2c_device_id wm8731_i2c_id[] = { | 760 | static const struct i2c_device_id wm8731_i2c_id[] = { |
724 | { "wm8731", 0 }, | 761 | { "wm8731", 0 }, |
725 | { } | 762 | { } |
@@ -733,6 +770,8 @@ static struct i2c_driver wm8731_i2c_driver = { | |||
733 | }, | 770 | }, |
734 | .probe = wm8731_i2c_probe, | 771 | .probe = wm8731_i2c_probe, |
735 | .remove = __devexit_p(wm8731_i2c_remove), | 772 | .remove = __devexit_p(wm8731_i2c_remove), |
773 | .suspend = wm8731_i2c_suspend, | ||
774 | .resume = wm8731_i2c_resume, | ||
736 | .id_table = wm8731_i2c_id, | 775 | .id_table = wm8731_i2c_id, |
737 | }; | 776 | }; |
738 | #endif | 777 | #endif |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index d28eeaceb857..370f7df03628 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -1766,6 +1766,21 @@ static int wm8753_i2c_remove(struct i2c_client *client) | |||
1766 | return 0; | 1766 | return 0; |
1767 | } | 1767 | } |
1768 | 1768 | ||
1769 | #ifdef CONFIG_PM | ||
1770 | static int wm8753_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1771 | { | ||
1772 | return snd_soc_suspend_device(&client->dev); | ||
1773 | } | ||
1774 | |||
1775 | static int wm8753_i2c_resume(struct i2c_client *client) | ||
1776 | { | ||
1777 | return snd_soc_resume_device(&client->dev); | ||
1778 | } | ||
1779 | #else | ||
1780 | #define wm8753_i2c_suspend NULL | ||
1781 | #define wm8753_i2c_resume NULL | ||
1782 | #endif | ||
1783 | |||
1769 | static const struct i2c_device_id wm8753_i2c_id[] = { | 1784 | static const struct i2c_device_id wm8753_i2c_id[] = { |
1770 | { "wm8753", 0 }, | 1785 | { "wm8753", 0 }, |
1771 | { } | 1786 | { } |
@@ -1779,6 +1794,8 @@ static struct i2c_driver wm8753_i2c_driver = { | |||
1779 | }, | 1794 | }, |
1780 | .probe = wm8753_i2c_probe, | 1795 | .probe = wm8753_i2c_probe, |
1781 | .remove = wm8753_i2c_remove, | 1796 | .remove = wm8753_i2c_remove, |
1797 | .suspend = wm8753_i2c_suspend, | ||
1798 | .resume = wm8753_i2c_resume, | ||
1782 | .id_table = wm8753_i2c_id, | 1799 | .id_table = wm8753_i2c_id, |
1783 | }; | 1800 | }; |
1784 | #endif | 1801 | #endif |
@@ -1834,6 +1851,22 @@ static int __devexit wm8753_spi_remove(struct spi_device *spi) | |||
1834 | return 0; | 1851 | return 0; |
1835 | } | 1852 | } |
1836 | 1853 | ||
1854 | #ifdef CONFIG_PM | ||
1855 | static int wm8753_spi_suspend(struct spi_device *spi, pm_message_t msg) | ||
1856 | { | ||
1857 | return snd_soc_suspend_device(&spi->dev); | ||
1858 | } | ||
1859 | |||
1860 | static int wm8753_spi_resume(struct spi_device *spi) | ||
1861 | { | ||
1862 | return snd_soc_resume_device(&spi->dev); | ||
1863 | } | ||
1864 | |||
1865 | #else | ||
1866 | #define wm8753_spi_suspend NULL | ||
1867 | #define wm8753_spi_resume NULL | ||
1868 | #endif | ||
1869 | |||
1837 | static struct spi_driver wm8753_spi_driver = { | 1870 | static struct spi_driver wm8753_spi_driver = { |
1838 | .driver = { | 1871 | .driver = { |
1839 | .name = "wm8753", | 1872 | .name = "wm8753", |
@@ -1842,6 +1875,8 @@ static struct spi_driver wm8753_spi_driver = { | |||
1842 | }, | 1875 | }, |
1843 | .probe = wm8753_spi_probe, | 1876 | .probe = wm8753_spi_probe, |
1844 | .remove = __devexit_p(wm8753_spi_remove), | 1877 | .remove = __devexit_p(wm8753_spi_remove), |
1878 | .suspend = wm8753_spi_suspend, | ||
1879 | .resume = wm8753_spi_resume, | ||
1845 | }; | 1880 | }; |
1846 | #endif | 1881 | #endif |
1847 | 1882 | ||
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index de99206a0103..ac308993ac5a 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -1399,6 +1399,21 @@ static __devexit int wm8900_i2c_remove(struct i2c_client *client) | |||
1399 | return 0; | 1399 | return 0; |
1400 | } | 1400 | } |
1401 | 1401 | ||
1402 | #ifdef CONFIG_PM | ||
1403 | static int wm8900_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1404 | { | ||
1405 | return snd_soc_suspend_device(&client->dev); | ||
1406 | } | ||
1407 | |||
1408 | static int wm8900_i2c_resume(struct i2c_client *client) | ||
1409 | { | ||
1410 | return snd_soc_resume_device(&client->dev); | ||
1411 | } | ||
1412 | #else | ||
1413 | #define wm8900_i2c_suspend NULL | ||
1414 | #define wm8900_i2c_resume NULL | ||
1415 | #endif | ||
1416 | |||
1402 | static const struct i2c_device_id wm8900_i2c_id[] = { | 1417 | static const struct i2c_device_id wm8900_i2c_id[] = { |
1403 | { "wm8900", 0 }, | 1418 | { "wm8900", 0 }, |
1404 | { } | 1419 | { } |
@@ -1412,6 +1427,8 @@ static struct i2c_driver wm8900_i2c_driver = { | |||
1412 | }, | 1427 | }, |
1413 | .probe = wm8900_i2c_probe, | 1428 | .probe = wm8900_i2c_probe, |
1414 | .remove = __devexit_p(wm8900_i2c_remove), | 1429 | .remove = __devexit_p(wm8900_i2c_remove), |
1430 | .suspend = wm8900_i2c_suspend, | ||
1431 | .resume = wm8900_i2c_resume, | ||
1415 | .id_table = wm8900_i2c_id, | 1432 | .id_table = wm8900_i2c_id, |
1416 | }; | 1433 | }; |
1417 | 1434 | ||
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 | ||
1735 | static int wm8903_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1736 | { | ||
1737 | return snd_soc_suspend_device(&client->dev); | ||
1738 | } | ||
1739 | |||
1740 | static 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 */ |
1735 | static const struct i2c_device_id wm8903_i2c_id[] = { | 1750 | static 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 | ||
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 | ||
920 | static int wm8940_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
921 | { | ||
922 | return snd_soc_suspend_device(&client->dev); | ||
923 | } | ||
924 | |||
925 | static 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 | |||
919 | static const struct i2c_device_id wm8940_i2c_id[] = { | 934 | static 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 | ||
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index e224d8add170..b7894d6dffc0 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -927,6 +927,21 @@ static __devexit int wm8960_i2c_remove(struct i2c_client *client) | |||
927 | return 0; | 927 | return 0; |
928 | } | 928 | } |
929 | 929 | ||
930 | #ifdef CONFIG_PM | ||
931 | static int wm8960_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
932 | { | ||
933 | return snd_soc_suspend_device(&client->dev); | ||
934 | } | ||
935 | |||
936 | static int wm8960_i2c_resume(struct i2c_client *client) | ||
937 | { | ||
938 | return snd_soc_resume_device(&client->dev); | ||
939 | } | ||
940 | #else | ||
941 | #define wm8960_i2c_suspend NULL | ||
942 | #define wm8960_i2c_resume NULL | ||
943 | #endif | ||
944 | |||
930 | static const struct i2c_device_id wm8960_i2c_id[] = { | 945 | static const struct i2c_device_id wm8960_i2c_id[] = { |
931 | { "wm8960", 0 }, | 946 | { "wm8960", 0 }, |
932 | { } | 947 | { } |
@@ -940,6 +955,8 @@ static struct i2c_driver wm8960_i2c_driver = { | |||
940 | }, | 955 | }, |
941 | .probe = wm8960_i2c_probe, | 956 | .probe = wm8960_i2c_probe, |
942 | .remove = __devexit_p(wm8960_i2c_remove), | 957 | .remove = __devexit_p(wm8960_i2c_remove), |
958 | .suspend = wm8960_i2c_suspend, | ||
959 | .resume = wm8960_i2c_resume, | ||
943 | .id_table = wm8960_i2c_id, | 960 | .id_table = wm8960_i2c_id, |
944 | }; | 961 | }; |
945 | 962 | ||
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index c05f71803aa8..03fac6a0f805 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c | |||
@@ -981,6 +981,21 @@ static int wm8988_i2c_remove(struct i2c_client *client) | |||
981 | return 0; | 981 | return 0; |
982 | } | 982 | } |
983 | 983 | ||
984 | #ifdef CONFIG_PM | ||
985 | static int wm8988_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
986 | { | ||
987 | return snd_soc_suspend_device(&client->dev); | ||
988 | } | ||
989 | |||
990 | static int wm8988_i2c_resume(struct i2c_client *client) | ||
991 | { | ||
992 | return snd_soc_resume_device(&client->dev); | ||
993 | } | ||
994 | #else | ||
995 | #define wm8988_i2c_suspend NULL | ||
996 | #define wm8988_i2c_resume NULL | ||
997 | #endif | ||
998 | |||
984 | static const struct i2c_device_id wm8988_i2c_id[] = { | 999 | static const struct i2c_device_id wm8988_i2c_id[] = { |
985 | { "wm8988", 0 }, | 1000 | { "wm8988", 0 }, |
986 | { } | 1001 | { } |
@@ -994,6 +1009,8 @@ static struct i2c_driver wm8988_i2c_driver = { | |||
994 | }, | 1009 | }, |
995 | .probe = wm8988_i2c_probe, | 1010 | .probe = wm8988_i2c_probe, |
996 | .remove = wm8988_i2c_remove, | 1011 | .remove = wm8988_i2c_remove, |
1012 | .suspend = wm8988_i2c_suspend, | ||
1013 | .resume = wm8988_i2c_resume, | ||
997 | .id_table = wm8988_i2c_id, | 1014 | .id_table = wm8988_i2c_id, |
998 | }; | 1015 | }; |
999 | #endif | 1016 | #endif |
@@ -1051,6 +1068,21 @@ static int __devexit wm8988_spi_remove(struct spi_device *spi) | |||
1051 | return 0; | 1068 | return 0; |
1052 | } | 1069 | } |
1053 | 1070 | ||
1071 | #ifdef CONFIG_PM | ||
1072 | static int wm8988_spi_suspend(struct spi_device *spi, pm_message_t msg) | ||
1073 | { | ||
1074 | return snd_soc_suspend_device(&spi->dev); | ||
1075 | } | ||
1076 | |||
1077 | static int wm8988_spi_resume(struct spi_device *spi) | ||
1078 | { | ||
1079 | return snd_soc_resume_device(&spi->dev); | ||
1080 | } | ||
1081 | #else | ||
1082 | #define wm8988_spi_suspend NULL | ||
1083 | #define wm8988_spi_resume NULL | ||
1084 | #endif | ||
1085 | |||
1054 | static struct spi_driver wm8988_spi_driver = { | 1086 | static struct spi_driver wm8988_spi_driver = { |
1055 | .driver = { | 1087 | .driver = { |
1056 | .name = "wm8988", | 1088 | .name = "wm8988", |
@@ -1059,6 +1091,8 @@ static struct spi_driver wm8988_spi_driver = { | |||
1059 | }, | 1091 | }, |
1060 | .probe = wm8988_spi_probe, | 1092 | .probe = wm8988_spi_probe, |
1061 | .remove = __devexit_p(wm8988_spi_remove), | 1093 | .remove = __devexit_p(wm8988_spi_remove), |
1094 | .suspend = wm8988_spi_suspend, | ||
1095 | .resume = wm8988_spi_resume, | ||
1062 | }; | 1096 | }; |
1063 | #endif | 1097 | #endif |
1064 | 1098 | ||
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 86fc57e25f97..dbe20597d872 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -1492,6 +1492,21 @@ static __devexit int wm9081_i2c_remove(struct i2c_client *client) | |||
1492 | return 0; | 1492 | return 0; |
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | #ifdef CONFIG_PM | ||
1496 | static int wm9081_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1497 | { | ||
1498 | return snd_soc_suspend_device(&client->dev); | ||
1499 | } | ||
1500 | |||
1501 | static int wm9081_i2c_resume(struct i2c_client *client) | ||
1502 | { | ||
1503 | return snd_soc_resume_device(&client->dev); | ||
1504 | } | ||
1505 | #else | ||
1506 | #define wm9081_i2c_suspend NULL | ||
1507 | #define wm9081_i2c_resume NULL | ||
1508 | #endif | ||
1509 | |||
1495 | static const struct i2c_device_id wm9081_i2c_id[] = { | 1510 | static const struct i2c_device_id wm9081_i2c_id[] = { |
1496 | { "wm9081", 0 }, | 1511 | { "wm9081", 0 }, |
1497 | { } | 1512 | { } |
@@ -1505,6 +1520,8 @@ static struct i2c_driver wm9081_i2c_driver = { | |||
1505 | }, | 1520 | }, |
1506 | .probe = wm9081_i2c_probe, | 1521 | .probe = wm9081_i2c_probe, |
1507 | .remove = __devexit_p(wm9081_i2c_remove), | 1522 | .remove = __devexit_p(wm9081_i2c_remove), |
1523 | .suspend = wm9081_i2c_suspend, | ||
1524 | .resume = wm9081_i2c_resume, | ||
1508 | .id_table = wm9081_i2c_id, | 1525 | .id_table = wm9081_i2c_id, |
1509 | }; | 1526 | }; |
1510 | 1527 | ||