aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Majewski <[email protected]>2022-05-09 14:10:55 +0200
committerMark Brown <[email protected]>2022-05-09 19:04:36 +0100
commit3a3610aaa9dce8ef1257bb42ac7f0fe2b5809a54 (patch)
tree6ba8a9c17248332a7943a47a0cedf5b6d6549142
parent29e87c4f62e2e688c1c91da9f8d54d0f042cb75e (diff)
ASoC: wm8940: add devicetree support
This adds devicetree support to the wm8940 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: Lukasz Majewski <[email protected]> Acked-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/Kconfig2
-rw-r--r--sound/soc/codecs/wm8940.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index b106e5517090..095712316baf 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1868,7 +1868,7 @@ config SND_SOC_WM8904
depends on I2C
config SND_SOC_WM8940
- tristate
+ tristate "Wolfson Microelectronics WM8940 codec"
depends on I2C
config SND_SOC_WM8955
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index 99b4524f53d8..589394d420ce 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -778,9 +778,16 @@ static const struct i2c_device_id wm8940_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, wm8940_i2c_id);
+static const struct of_device_id wm8940_of_match[] = {
+ { .compatible = "wlf,wm8940", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, wm8940_of_match);
+
static struct i2c_driver wm8940_i2c_driver = {
.driver = {
.name = "wm8940",
+ .of_match_table = wm8940_of_match,
},
.probe_new = wm8940_i2c_probe,
.id_table = wm8940_i2c_id,