From 4b131347ec48ae58b339a17b84e44a12ba8bd162 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 29 Aug 2011 14:12:15 +0100 Subject: [PATCH] --- yaml --- r: 270555 b: refs/heads/master c: 13c7d08f54cc83c1cd9884c5e142e485b748de18 h: refs/heads/master i: 270553: ba0258a7e10021cf6afb45795dcff4eb83f36cca 270551: 54365845d9df65e050dc085288320b9440cdeee4 v: v3 --- [refs] | 2 +- .../devicetree/bindings/sound/wm8770.txt | 16 ++++++++++++++++ trunk/sound/soc/codecs/wm8770.c | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 trunk/Documentation/devicetree/bindings/sound/wm8770.txt diff --git a/[refs] b/[refs] index bd1948b336ed..c26d16a25460 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1e3ad571d56ab96e5fab87cea71c0e657d4708cb +refs/heads/master: 13c7d08f54cc83c1cd9884c5e142e485b748de18 diff --git a/trunk/Documentation/devicetree/bindings/sound/wm8770.txt b/trunk/Documentation/devicetree/bindings/sound/wm8770.txt new file mode 100644 index 000000000000..866e00ca150b --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/sound/wm8770.txt @@ -0,0 +1,16 @@ +WM8770 audio CODEC + +This device supports SPI. + +Required properties: + + - compatible : "wlf,wm8770" + + - reg : the chip select number. + +Example: + +codec: wm8770@1 { + compatible = "wlf,wm8770"; + reg = <1>; +}; diff --git a/trunk/sound/soc/codecs/wm8770.c b/trunk/sound/soc/codecs/wm8770.c index 19b92baa9e8c..aa05e6507f84 100644 --- a/trunk/sound/soc/codecs/wm8770.c +++ b/trunk/sound/soc/codecs/wm8770.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -684,6 +685,12 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8770 = { .reg_cache_default = wm8770_reg_defs }; +static const struct of_device_id wm8770_of_match[] = { + { .compatible = "wlf,wm8770", }, + { } +}; +MODULE_DEVICE_TABLE(of, wm8770_of_match); + #if defined(CONFIG_SPI_MASTER) static int __devinit wm8770_spi_probe(struct spi_device *spi) { @@ -715,6 +722,7 @@ static struct spi_driver wm8770_spi_driver = { .driver = { .name = "wm8770", .owner = THIS_MODULE, + .of_match_table = wm8770_of_match, }, .probe = wm8770_spi_probe, .remove = __devexit_p(wm8770_spi_remove)