aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2018-08-22 23:49:36 -0400
committerMark Brown <broonie@kernel.org>2018-08-28 15:11:37 -0400
commit960cdd50ca9fdfeb82c2757107bcb7f93c8d7d41 (patch)
treefa375aa7bab5a4b648cc0490d51ed597c91d3470
parent7509487785d7a2bf3606cf26710f0ca29e9ca94d (diff)
ASoC: wm8804: Add ACPI support
HID made of either Wolfson/CirrusLogic PCI ID + 8804 identifier. This helps enumerate the HifiBerry Digi+ HAT boards on the Up2 platform. The scripts at https://github.com/thesofproject/acpi-scripts can be used to add the ACPI initrd overlays. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8804-i2c.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8804-i2c.c b/sound/soc/codecs/wm8804-i2c.c
index f27464c2c5ba..79541960f45d 100644
--- a/sound/soc/codecs/wm8804-i2c.c
+++ b/sound/soc/codecs/wm8804-i2c.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/i2c.h> 15#include <linux/i2c.h>
16#include <linux/acpi.h>
16 17
17#include "wm8804.h" 18#include "wm8804.h"
18 19
@@ -40,17 +41,29 @@ static const struct i2c_device_id wm8804_i2c_id[] = {
40}; 41};
41MODULE_DEVICE_TABLE(i2c, wm8804_i2c_id); 42MODULE_DEVICE_TABLE(i2c, wm8804_i2c_id);
42 43
44#if defined(CONFIG_OF)
43static const struct of_device_id wm8804_of_match[] = { 45static const struct of_device_id wm8804_of_match[] = {
44 { .compatible = "wlf,wm8804", }, 46 { .compatible = "wlf,wm8804", },
45 { } 47 { }
46}; 48};
47MODULE_DEVICE_TABLE(of, wm8804_of_match); 49MODULE_DEVICE_TABLE(of, wm8804_of_match);
50#endif
51
52#ifdef CONFIG_ACPI
53static const struct acpi_device_id wm8804_acpi_match[] = {
54 { "1AEC8804", 0 }, /* Wolfson PCI ID + part ID */
55 { "10138804", 0 }, /* Cirrus Logic PCI ID + part ID */
56 { },
57};
58MODULE_DEVICE_TABLE(acpi, wm8804_acpi_match);
59#endif
48 60
49static struct i2c_driver wm8804_i2c_driver = { 61static struct i2c_driver wm8804_i2c_driver = {
50 .driver = { 62 .driver = {
51 .name = "wm8804", 63 .name = "wm8804",
52 .pm = &wm8804_pm, 64 .pm = &wm8804_pm,
53 .of_match_table = wm8804_of_match, 65 .of_match_table = of_match_ptr(wm8804_of_match),
66 .acpi_match_table = ACPI_PTR(wm8804_acpi_match),
54 }, 67 },
55 .probe = wm8804_i2c_probe, 68 .probe = wm8804_i2c_probe,
56 .remove = wm8804_i2c_remove, 69 .remove = wm8804_i2c_remove,