diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-29 09:12:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-31 04:52:43 -0400 |
commit | 13c7d08f54cc83c1cd9884c5e142e485b748de18 (patch) | |
tree | 1f9d68ce20d0e61c45be82fa52d528c4fe67def4 /sound/soc/codecs/wm8770.c | |
parent | 1e3ad571d56ab96e5fab87cea71c0e657d4708cb (diff) |
ASoC: Add device tree binding for WM8770
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8770.c')
-rw-r--r-- | sound/soc/codecs/wm8770.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index 19b92baa9e8c..aa05e6507f84 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/of_device.h> | ||
17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
@@ -684,6 +685,12 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8770 = { | |||
684 | .reg_cache_default = wm8770_reg_defs | 685 | .reg_cache_default = wm8770_reg_defs |
685 | }; | 686 | }; |
686 | 687 | ||
688 | static const struct of_device_id wm8770_of_match[] = { | ||
689 | { .compatible = "wlf,wm8770", }, | ||
690 | { } | ||
691 | }; | ||
692 | MODULE_DEVICE_TABLE(of, wm8770_of_match); | ||
693 | |||
687 | #if defined(CONFIG_SPI_MASTER) | 694 | #if defined(CONFIG_SPI_MASTER) |
688 | static int __devinit wm8770_spi_probe(struct spi_device *spi) | 695 | static int __devinit wm8770_spi_probe(struct spi_device *spi) |
689 | { | 696 | { |
@@ -715,6 +722,7 @@ static struct spi_driver wm8770_spi_driver = { | |||
715 | .driver = { | 722 | .driver = { |
716 | .name = "wm8770", | 723 | .name = "wm8770", |
717 | .owner = THIS_MODULE, | 724 | .owner = THIS_MODULE, |
725 | .of_match_table = wm8770_of_match, | ||
718 | }, | 726 | }, |
719 | .probe = wm8770_spi_probe, | 727 | .probe = wm8770_spi_probe, |
720 | .remove = __devexit_p(wm8770_spi_remove) | 728 | .remove = __devexit_p(wm8770_spi_remove) |