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 <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220509121055.31103-1-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Lukasz Majewski 2022-05-09 14:10:55 +02:00 committed by Mark Brown
parent 29e87c4f62
commit 3a3610aaa9
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -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,