aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8750.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8750.c')
-rw-r--r--sound/soc/codecs/wm8750.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index d0003cc3bcd6..15f03721ec6f 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -21,6 +21,7 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/spi/spi.h> 22#include <linux/spi/spi.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/of_device.h>
24#include <sound/core.h> 25#include <sound/core.h>
25#include <sound/pcm.h> 26#include <sound/pcm.h>
26#include <sound/pcm_params.h> 27#include <sound/pcm_params.h>
@@ -751,6 +752,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8750 = {
751 .reg_cache_default = wm8750_reg, 752 .reg_cache_default = wm8750_reg,
752}; 753};
753 754
755static const struct of_device_id wm8750_of_match[] = {
756 { .compatible = "wlf,wm8750", },
757 { .compatible = "wlf,wm8987", },
758 { }
759};
760MODULE_DEVICE_TABLE(of, wm8750_of_match);
761
754#if defined(CONFIG_SPI_MASTER) 762#if defined(CONFIG_SPI_MASTER)
755static int __devinit wm8750_spi_probe(struct spi_device *spi) 763static int __devinit wm8750_spi_probe(struct spi_device *spi)
756{ 764{
@@ -787,8 +795,9 @@ MODULE_DEVICE_TABLE(spi, wm8750_spi_ids);
787 795
788static struct spi_driver wm8750_spi_driver = { 796static struct spi_driver wm8750_spi_driver = {
789 .driver = { 797 .driver = {
790 .name = "wm8750-codec", 798 .name = "wm8750",
791 .owner = THIS_MODULE, 799 .owner = THIS_MODULE,
800 .of_match_table = wm8750_of_match,
792 }, 801 },
793 .id_table = wm8750_spi_ids, 802 .id_table = wm8750_spi_ids,
794 .probe = wm8750_spi_probe, 803 .probe = wm8750_spi_probe,
@@ -833,8 +842,9 @@ MODULE_DEVICE_TABLE(i2c, wm8750_i2c_id);
833 842
834static struct i2c_driver wm8750_i2c_driver = { 843static struct i2c_driver wm8750_i2c_driver = {
835 .driver = { 844 .driver = {
836 .name = "wm8750-codec", 845 .name = "wm8750",
837 .owner = THIS_MODULE, 846 .owner = THIS_MODULE,
847 .of_match_table = wm8750_of_match,
838 }, 848 },
839 .probe = wm8750_i2c_probe, 849 .probe = wm8750_i2c_probe,
840 .remove = __devexit_p(wm8750_i2c_remove), 850 .remove = __devexit_p(wm8750_i2c_remove),