From de7ecf54a095d977862e51e9270ce62bd0c70c1d Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 2 Aug 2011 13:22:36 +0900 Subject: [PATCH] --- yaml --- r: 270495 b: refs/heads/master c: 733eef3e96726350888bd0ec1526f2561bec44ed h: refs/heads/master i: 270493: 2a66d544b0ba0436be2e0a4e3a72e10bc3ce263c 270491: f8bd98feb72d7481a600b9c5463042a0e43aa25c 270487: 47c1353b6d585f49b9ff1cc6f4dc10254fb2163e 270479: e3a1e5674c7b1b6375cabc00d0bc030cd978f0ff 270463: dd99ba8f0792ba0567f064eeee18bc98501b40f7 v: v3 --- [refs] | 2 +- .../devicetree/bindings/sound/wm8580.txt | 16 ++++++++++++++++ trunk/sound/soc/codecs/wm8580.c | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 trunk/Documentation/devicetree/bindings/sound/wm8580.txt diff --git a/[refs] b/[refs] index d460748a74e7..0692bafb99e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bf5a85be9739ea26f05874992cb05a9c774f359f +refs/heads/master: 733eef3e96726350888bd0ec1526f2561bec44ed diff --git a/trunk/Documentation/devicetree/bindings/sound/wm8580.txt b/trunk/Documentation/devicetree/bindings/sound/wm8580.txt new file mode 100644 index 000000000000..7d9821f348da --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/sound/wm8580.txt @@ -0,0 +1,16 @@ +WM8580 audio CODEC + +This device supports I2C only. + +Required properties: + + - compatible : "wlf,wm8580" + + - reg : the I2C address of the device. + +Example: + +codec: wm8580@1a { + compatible = "wlf,wm8580"; + reg = <0x1a>; +}; diff --git a/trunk/sound/soc/codecs/wm8580.c b/trunk/sound/soc/codecs/wm8580.c index 95ac6651094f..4664c3a76c78 100644 --- a/trunk/sound/soc/codecs/wm8580.c +++ b/trunk/sound/soc/codecs/wm8580.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -907,6 +908,11 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8580 = { .reg_cache_default = wm8580_reg, }; +static const struct of_device_id wm8580_of_match[] = { + { .compatible = "wlf,wm8580" }, + { }, +}; + #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) static int wm8580_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) @@ -945,6 +951,7 @@ static struct i2c_driver wm8580_i2c_driver = { .driver = { .name = "wm8580", .owner = THIS_MODULE, + .of_match_table = wm8580_of_match, }, .probe = wm8580_i2c_probe, .remove = wm8580_i2c_remove,