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 WM8804

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

+27
+18
Documentation/devicetree/bindings/sound/wm8804.txt
··· 1 + WM8804 audio CODEC 2 + 3 + This device supports both I2C and SPI (configured with pin strapping 4 + on the board). 5 + 6 + Required properties: 7 + 8 + - compatible : "wlf,wm8804" 9 + 10 + - reg : the I2C address of the device for I2C, the chip select 11 + number for SPI. 12 + 13 + Example: 14 + 15 + codec: wm8804@1a { 16 + compatible = "wlf,wm8804"; 17 + reg = <0x1a>; 18 + };
+9
sound/soc/codecs/wm8804.c
··· 16 16 #include <linux/delay.h> 17 17 #include <linux/pm.h> 18 18 #include <linux/i2c.h> 19 + #include <linux/of_device.h> 19 20 #include <linux/spi/spi.h> 20 21 #include <linux/regulator/consumer.h> 21 22 #include <linux/slab.h> ··· 718 717 .volatile_register = wm8804_volatile 719 718 }; 720 719 720 + static const struct of_device_id wm8804_of_match[] = { 721 + { .compatible = "wlf,wm8804", }, 722 + { } 723 + }; 724 + MODULE_DEVICE_TABLE(of, wm8804_of_match); 725 + 721 726 #if defined(CONFIG_SPI_MASTER) 722 727 static int __devinit wm8804_spi_probe(struct spi_device *spi) 723 728 { ··· 755 748 .driver = { 756 749 .name = "wm8804", 757 750 .owner = THIS_MODULE, 751 + .of_match_table = wm8804_of_match, 758 752 }, 759 753 .probe = wm8804_spi_probe, 760 754 .remove = __devexit_p(wm8804_spi_remove) ··· 800 792 .driver = { 801 793 .name = "wm8804", 802 794 .owner = THIS_MODULE, 795 + .of_match_table = wm8804_of_match, 803 796 }, 804 797 .probe = wm8804_i2c_probe, 805 798 .remove = __devexit_p(wm8804_i2c_remove),