* [PATCH] ASoC: wm8962: Add device tree support
@ 2012-12-13 1:28 Fabio Estevam
2012-12-24 15:37 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2012-12-13 1:28 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel
From: Fabio Estevam <fabio.estevam@freescale.com>
Add device tree support.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Documentation/devicetree/bindings/sound/wm8962.txt | 16 ++++++++++++++++
sound/soc/codecs/wm8962.c | 7 +++++++
2 files changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/wm8962.txt
diff --git a/Documentation/devicetree/bindings/sound/wm8962.txt b/Documentation/devicetree/bindings/sound/wm8962.txt
new file mode 100644
index 0000000..dceb3b1
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8962.txt
@@ -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>;
+};
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8fd38cb..1ebeff4 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -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,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: wm8962: Add device tree support
2012-12-13 1:28 [PATCH] ASoC: wm8962: Add device tree support Fabio Estevam
@ 2012-12-24 15:37 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-12-24 15:37 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 169 bytes --]
On Wed, Dec 12, 2012 at 11:28:04PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Add device tree support.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-24 15:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-13 1:28 [PATCH] ASoC: wm8962: Add device tree support Fabio Estevam
2012-12-24 15:37 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.