ASoC: wm8974: add devicetree support
authorMans Rullgard <mans@mansr.com>
Wed, 16 Dec 2015 13:02:55 +0000 (13:02 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 18 Dec 2015 08:25:58 +0000 (08:25 +0000)
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>
sound/soc/codecs/Kconfig
sound/soc/codecs/wm8974.c

index cfdafc4c11ea9a64c465eef6d9ac4ed3520c159a..e36b14c5cb57aa76f24f802126fa716d9a3b44c4 100644 (file)
@@ -838,7 +838,8 @@ config SND_SOC_WM8971
        tristate
 
 config SND_SOC_WM8974
-       tristate
+       tristate "Wolfson Microelectronics WM8974 codec"
+       depends on I2C
 
 config SND_SOC_WM8978
        tristate "Wolfson Microelectronics WM8978 codec"
index 0a60677397b3dedb0b9652e112137e9b3c03f3d4..45ba828b19de54a39d448e84228b9ddf45f9da15 100644 (file)
@@ -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,