aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-12-12 20:28:04 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-24 10:36:57 -0500
commit5ce568329e4fcf9e9050bff878f8157ca43bc882 (patch)
treeba67bc2c95ce80b84e9a31985ea34c876c588e25
parenta49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff)
ASoC: wm8962: Add device tree support
Add device tree support. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--Documentation/devicetree/bindings/sound/wm8962.txt16
-rw-r--r--sound/soc/codecs/wm8962.c7
2 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/wm8962.txt b/Documentation/devicetree/bindings/sound/wm8962.txt
new file mode 100644
index 000000000000..dceb3b1c2bb7
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8962.txt
@@ -0,0 +1,16 @@
1WM8962 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7 - compatible : "wlf,wm8962"
8
9 - reg : the I2C address of the device.
10
11Example:
12
13codec: wm8962@1a {
14 compatible = "wlf,wm8962";
15 reg = <0x1a>;
16};
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index bd4b0db4cdaa..705d0a0e9137 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3758,10 +3758,17 @@ static const struct i2c_device_id wm8962_i2c_id[] = {
3758}; 3758};
3759MODULE_DEVICE_TABLE(i2c, wm8962_i2c_id); 3759MODULE_DEVICE_TABLE(i2c, wm8962_i2c_id);
3760 3760
3761static const struct of_device_id wm8962_of_match[] = {
3762 { .compatible = "wlf,wm8962", },
3763 { }
3764};
3765MODULE_DEVICE_TABLE(of, wm8962_of_match);
3766
3761static struct i2c_driver wm8962_i2c_driver = { 3767static struct i2c_driver wm8962_i2c_driver = {
3762 .driver = { 3768 .driver = {
3763 .name = "wm8962", 3769 .name = "wm8962",
3764 .owner = THIS_MODULE, 3770 .owner = THIS_MODULE,
3771 .of_match_table = wm8962_of_match,
3765 .pm = &wm8962_pm, 3772 .pm = &wm8962_pm,
3766 }, 3773 },
3767 .probe = wm8962_i2c_probe, 3774 .probe = wm8962_i2c_probe,