Skip to content

Commit

Permalink
ASoC: wm8962: Add device tree support
Browse files Browse the repository at this point in the history
Add device tree support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Dec 24, 2012
1 parent a49f0d1 commit 5ce5683
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Documentation/devicetree/bindings/sound/wm8962.txt
Original file line number Diff line number Diff line change
@@ -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>;
};
7 changes: 7 additions & 0 deletions sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5ce5683

Please sign in to comment.