Enable ACPI device probing for dmic so that DMIC parameters can be passed from ACPI.
Signed-off-by: Sathyanarayana Nujella sathyanarayana.nujella@intel.com Signed-off-by: Jairaj Arava jairaj.arava@intel.com Signed-off-by: Harsha Priya harshapriya.n@intel.com --- sound/soc/codecs/dmic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c index 8c4926d..ab1aa01 100644 --- a/sound/soc/codecs/dmic.c +++ b/sound/soc/codecs/dmic.c @@ -19,6 +19,7 @@ * */
+#include <linux/acpi.h> #include <linux/delay.h> #include <linux/gpio.h> #include <linux/gpio/consumer.h> @@ -144,15 +145,26 @@ static int dmic_dev_probe(struct platform_device *pdev)
MODULE_ALIAS("platform:dmic-codec");
+#ifdef CONFIG_OF static const struct of_device_id dmic_dev_match[] = { {.compatible = "dmic-codec"}, {} }; +#endif + +#ifdef CONFIG_ACPI +static const struct acpi_device_id dmic_acpi_match[] = { + { "DMIC", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(acpi, dmic_acpi_match); +#endif
static struct platform_driver dmic_driver = { .driver = { .name = "dmic-codec", .of_match_table = dmic_dev_match, + .acpi_match_table = ACPI_PTR(dmic_acpi_match), }, .probe = dmic_dev_probe, };