summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8974.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2015-12-16 14:02:55 +0100
committerMark Brown <broonie@kernel.org>2015-12-18 09:25:58 +0100
commit2005bd881d273456e26a0b2027976f75fc47701f (patch)
tree80c65e3b313f46e8243eaa27bafb8983abf73cde /sound/soc/codecs/wm8974.c
parentLinux 4.4-rc1 (diff)
downloadlinux-2005bd881d273456e26a0b2027976f75fc47701f.tar.xz
linux-2005bd881d273456e26a0b2027976f75fc47701f.zip
ASoC: wm8974: add devicetree support
This adds devicetree support to the wm8974 codec driver. With a DT-based kernel, there is no board-specific setting to select the driver so allow it to be manually chosen. Signed-off-by: Mans Rullgard <mans@mansr.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm8974.c')
-rw-r--r--sound/soc/codecs/wm8974.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 0a60677397b3..45ba828b19de 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -631,9 +631,16 @@ static const struct i2c_device_id wm8974_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, wm8974_i2c_id);
+static const struct of_device_id wm8974_of_match[] = {
+ { .compatible = "wlf,wm8974", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, wm8974_of_match);
+
static struct i2c_driver wm8974_i2c_driver = {
.driver = {
.name = "wm8974",
+ .of_match_table = wm8974_of_match,
},
.probe = wm8974_i2c_probe,
.remove = wm8974_i2c_remove,