diff options
-rw-r--r-- | Documentation/devicetree/bindings/sound/wm8523.txt | 16 | ||||
-rw-r--r-- | sound/soc/codecs/wm8523.c | 7 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/wm8523.txt b/Documentation/devicetree/bindings/sound/wm8523.txt new file mode 100644 index 000000000000..04746186b283 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/wm8523.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | WM8523 audio CODEC | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "wlf,wm8523" | ||
8 | |||
9 | - reg : the I2C address of the device. | ||
10 | |||
11 | Example: | ||
12 | |||
13 | codec: wm8523@1a { | ||
14 | compatible = "wlf,wm8523"; | ||
15 | reg = <0x1a>; | ||
16 | }; | ||
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index 131200917c56..52812d1a90e4 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/of_device.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
@@ -514,6 +515,11 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8523 = { | |||
514 | .volatile_register = wm8523_volatile_register, | 515 | .volatile_register = wm8523_volatile_register, |
515 | }; | 516 | }; |
516 | 517 | ||
518 | static const struct of_device_id wm8523_of_match[] = { | ||
519 | { .compatible = "wlf,wm8523" }, | ||
520 | { }, | ||
521 | }; | ||
522 | |||
517 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 523 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
518 | static __devinit int wm8523_i2c_probe(struct i2c_client *i2c, | 524 | static __devinit int wm8523_i2c_probe(struct i2c_client *i2c, |
519 | const struct i2c_device_id *id) | 525 | const struct i2c_device_id *id) |
@@ -553,6 +559,7 @@ static struct i2c_driver wm8523_i2c_driver = { | |||
553 | .driver = { | 559 | .driver = { |
554 | .name = "wm8523", | 560 | .name = "wm8523", |
555 | .owner = THIS_MODULE, | 561 | .owner = THIS_MODULE, |
562 | .of_match_table = wm8523_of_match, | ||
556 | }, | 563 | }, |
557 | .probe = wm8523_i2c_probe, | 564 | .probe = wm8523_i2c_probe, |
558 | .remove = __devexit_p(wm8523_i2c_remove), | 565 | .remove = __devexit_p(wm8523_i2c_remove), |