diff options
-rw-r--r-- | sound/soc/codecs/wm8804-i2c.c | 15 |
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 | }; |
41 | MODULE_DEVICE_TABLE(i2c, wm8804_i2c_id); | 42 | MODULE_DEVICE_TABLE(i2c, wm8804_i2c_id); |
42 | 43 | ||
44 | #if defined(CONFIG_OF) | ||
43 | static const struct of_device_id wm8804_of_match[] = { | 45 | static const struct of_device_id wm8804_of_match[] = { |
44 | { .compatible = "wlf,wm8804", }, | 46 | { .compatible = "wlf,wm8804", }, |
45 | { } | 47 | { } |
46 | }; | 48 | }; |
47 | MODULE_DEVICE_TABLE(of, wm8804_of_match); | 49 | MODULE_DEVICE_TABLE(of, wm8804_of_match); |
50 | #endif | ||
51 | |||
52 | #ifdef CONFIG_ACPI | ||
53 | static 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 | }; | ||
58 | MODULE_DEVICE_TABLE(acpi, wm8804_acpi_match); | ||
59 | #endif | ||
48 | 60 | ||
49 | static struct i2c_driver wm8804_i2c_driver = { | 61 | static 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, |