[PATCH 2/2] ASoC: wm8961: add support for devicetree
Doug Brown
doug at schmorgal.com
Sat Oct 1 22:00:39 CEST 2022
This adds support for devicetree to the WM8961 driver so it can be used
with modern DT-based kernels.
Signed-off-by: Doug Brown <doug at schmorgal.com>
---
sound/soc/codecs/Kconfig | 2 +-
sound/soc/codecs/wm8961.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index e3b90c425faf..2b5787ee8d31 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1929,7 +1929,7 @@ config SND_SOC_WM8960
depends on I2C
config SND_SOC_WM8961
- tristate
+ tristate "Wolfson Microelectronics WM8961 CODEC"
depends on I2C
config SND_SOC_WM8962
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index 7dc6aaf65576..539096184eda 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -971,6 +971,12 @@ static const struct i2c_device_id wm8961_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, wm8961_i2c_id);
+static const struct of_device_id wm8961_of_match[] = {
+ { .compatible = "wlf,wm8961", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, wm8961_of_match);
+
static struct i2c_driver wm8961_i2c_driver = {
.driver = {
.name = "wm8961",
--
2.34.1
More information about the Alsa-devel
mailing list