Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mans Rullgard and committed by
Mark Brown
2005bd88 8005c49d

+9 -1
+2 -1
sound/soc/codecs/Kconfig
··· 838 838 tristate 839 839 840 840 config SND_SOC_WM8974 841 - tristate 841 + tristate "Wolfson Microelectronics WM8974 codec" 842 + depends on I2C 842 843 843 844 config SND_SOC_WM8978 844 845 tristate "Wolfson Microelectronics WM8978 codec"
+7
sound/soc/codecs/wm8974.c
··· 631 631 }; 632 632 MODULE_DEVICE_TABLE(i2c, wm8974_i2c_id); 633 633 634 + static const struct of_device_id wm8974_of_match[] = { 635 + { .compatible = "wlf,wm8974", }, 636 + { } 637 + }; 638 + MODULE_DEVICE_TABLE(of, wm8974_of_match); 639 + 634 640 static struct i2c_driver wm8974_i2c_driver = { 635 641 .driver = { 636 642 .name = "wm8974", 643 + .of_match_table = wm8974_of_match, 637 644 }, 638 645 .probe = wm8974_i2c_probe, 639 646 .remove = wm8974_i2c_remove,