aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8776.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-29 09:14:45 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-31 04:52:50 -0400
commitb6de431556023a6ed901a27284f15fff2e043598 (patch)
treedeca9e1c28151f08683920fdaa4d410d0dac3bed /sound/soc/codecs/wm8776.c
parent13c7d08f54cc83c1cd9884c5e142e485b748de18 (diff)
ASoC: Add device tree binding for WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8776.c')
-rw-r--r--sound/soc/codecs/wm8776.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index 367a990e6cc4..0cfbfc1dc093 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -18,6 +18,7 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/pm.h> 19#include <linux/pm.h>
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/of_device.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/spi/spi.h> 23#include <linux/spi/spi.h>
23#include <linux/slab.h> 24#include <linux/slab.h>
@@ -452,6 +453,12 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8776 = {
452 .reg_cache_default = wm8776_reg, 453 .reg_cache_default = wm8776_reg,
453}; 454};
454 455
456static const struct of_device_id wm8776_of_match[] = {
457 { .compatible = "wlf,wm8776", },
458 { }
459};
460MODULE_DEVICE_TABLE(of, wm8776_of_match);
461
455#if defined(CONFIG_SPI_MASTER) 462#if defined(CONFIG_SPI_MASTER)
456static int __devinit wm8776_spi_probe(struct spi_device *spi) 463static int __devinit wm8776_spi_probe(struct spi_device *spi)
457{ 464{
@@ -483,6 +490,7 @@ static struct spi_driver wm8776_spi_driver = {
483 .driver = { 490 .driver = {
484 .name = "wm8776", 491 .name = "wm8776",
485 .owner = THIS_MODULE, 492 .owner = THIS_MODULE,
493 .of_match_table = wm8776_of_match,
486 }, 494 },
487 .probe = wm8776_spi_probe, 495 .probe = wm8776_spi_probe,
488 .remove = __devexit_p(wm8776_spi_remove), 496 .remove = __devexit_p(wm8776_spi_remove),
@@ -527,6 +535,7 @@ static struct i2c_driver wm8776_i2c_driver = {
527 .driver = { 535 .driver = {
528 .name = "wm8776", 536 .name = "wm8776",
529 .owner = THIS_MODULE, 537 .owner = THIS_MODULE,
538 .of_match_table = wm8776_of_match,
530 }, 539 },
531 .probe = wm8776_i2c_probe, 540 .probe = wm8776_i2c_probe,
532 .remove = __devexit_p(wm8776_i2c_remove), 541 .remove = __devexit_p(wm8776_i2c_remove),