[alsa-devel] [PATCH] ASoC: ADAU7002: Adding ACPI id

Akshu Agrawal akshu.agrawal at amd.com
Fri Feb 16 08:41:12 CET 2018


Adding ACPI entry id for probing the driver.

Signed-off-by: Akshu Agrawal <akshu.agrawal at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
 sound/soc/codecs/adau7002.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/adau7002.c b/sound/soc/codecs/adau7002.c
index 49475e3..fdff868 100644
--- a/sound/soc/codecs/adau7002.c
+++ b/sound/soc/codecs/adau7002.c
@@ -7,6 +7,7 @@
  * Licensed under the GPL-2.
  */
 
+#include <linux/acpi.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/of.h>
@@ -69,10 +70,19 @@ static int adau7002_remove(struct platform_device *pdev)
 MODULE_DEVICE_TABLE(of, adau7002_dt_ids);
 #endif
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id adau7002_acpi_match[] = {
+	{ "ADAU7002", 0 },
+	{},
+};
+MODULE_DEVICE_TABLE(acpi, adau7002_acpi_match);
+#endif
+
 static struct platform_driver adau7002_driver = {
 	.driver = {
 		.name = "adau7002",
 		.of_match_table	= of_match_ptr(adau7002_dt_ids),
+		.acpi_match_table = ACPI_PTR(adau7002_acpi_match),
 	},
 	.probe = adau7002_probe,
 	.remove = adau7002_remove,
-- 
1.9.1



More information about the Alsa-devel mailing list