Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Add device tree binding for WM8523

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>

+23
+16
Documentation/devicetree/bindings/sound/wm8523.txt
··· 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 + };
+7
sound/soc/codecs/wm8523.c
··· 20 20 #include <linux/platform_device.h> 21 21 #include <linux/regulator/consumer.h> 22 22 #include <linux/slab.h> 23 + #include <linux/of_device.h> 23 24 #include <sound/core.h> 24 25 #include <sound/pcm.h> 25 26 #include <sound/pcm_params.h> ··· 515 514 .volatile_register = wm8523_volatile_register, 516 515 }; 517 516 517 + static const struct of_device_id wm8523_of_match[] = { 518 + { .compatible = "wlf,wm8523" }, 519 + { }, 520 + }; 521 + 518 522 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 519 523 static __devinit int wm8523_i2c_probe(struct i2c_client *i2c, 520 524 const struct i2c_device_id *id) ··· 559 553 .driver = { 560 554 .name = "wm8523", 561 555 .owner = THIS_MODULE, 556 + .of_match_table = wm8523_of_match, 562 557 }, 563 558 .probe = wm8523_i2c_probe, 564 559 .remove = __devexit_p(wm8523_i2c_remove),