]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: wm8962: Add device tree support
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 13 Dec 2012 01:28:04 +0000 (23:28 -0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 24 Dec 2012 15:36:57 +0000 (15:36 +0000)
Add device tree support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Documentation/devicetree/bindings/sound/wm8962.txt [new file with mode: 0644]
sound/soc/codecs/wm8962.c

diff --git a/Documentation/devicetree/bindings/sound/wm8962.txt b/Documentation/devicetree/bindings/sound/wm8962.txt
new file mode 100644 (file)
index 0000000..dceb3b1
--- /dev/null
@@ -0,0 +1,16 @@
+WM8962 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : "wlf,wm8962"
+
+  - reg : the I2C address of the device.
+
+Example:
+
+codec: wm8962@1a {
+       compatible = "wlf,wm8962";
+       reg = <0x1a>;
+};
index bd4b0db4cdaadb11fe12caed12b8e8e2f5bab7b1..705d0a0e9137d4a4c8735394d125415159a2510c 100644 (file)
@@ -3758,10 +3758,17 @@ static const struct i2c_device_id wm8962_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, wm8962_i2c_id);
 
+static const struct of_device_id wm8962_of_match[] = {
+       { .compatible = "wlf,wm8962", },
+       { }
+};
+MODULE_DEVICE_TABLE(of, wm8962_of_match);
+
 static struct i2c_driver wm8962_i2c_driver = {
        .driver = {
                .name = "wm8962",
                .owner = THIS_MODULE,
+               .of_match_table = wm8962_of_match,
                .pm = &wm8962_pm,
        },
        .probe =    wm8962_i2c_probe,