summaryrefslogtreecommitdiff
path: root/src/drivers/generic
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/generic')
-rw-r--r--src/drivers/generic/max98357a/chip.h4
-rw-r--r--src/drivers/generic/max98357a/max98357a.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/drivers/generic/max98357a/chip.h b/src/drivers/generic/max98357a/chip.h
index ec4e94f3e6..f956846b60 100644
--- a/src/drivers/generic/max98357a/chip.h
+++ b/src/drivers/generic/max98357a/chip.h
@@ -14,6 +14,10 @@
#include <arch/acpi_device.h>
struct drivers_generic_max98357a_config {
+
+ /* ACPI _HID */
+ const char *hid;
+
/* SDMODE GPIO */
struct acpi_gpio sdmode_gpio;
diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c
index 2b0ec3ba04..56fd26c3fd 100644
--- a/src/drivers/generic/max98357a/max98357a.c
+++ b/src/drivers/generic/max98357a/max98357a.c
@@ -23,7 +23,6 @@
#if CONFIG(HAVE_ACPI_TABLES)
#define MAX98357A_ACPI_NAME "MAXM"
-#define MAX98357A_ACPI_HID "MX98357A"
static void max98357a_fill_ssdt(struct device *dev)
{
@@ -42,7 +41,13 @@ static void max98357a_fill_ssdt(struct device *dev)
/* Device */
acpigen_write_scope(scope);
acpigen_write_device(name);
- acpigen_write_name_string("_HID", MAX98357A_ACPI_HID);
+
+ if (!config->hid) {
+ printk(BIOS_ERR, "%s: ERROR: _HID required\n", dev_path(dev));
+ return;
+ }
+
+ acpigen_write_name_string("_HID", config->hid);
acpigen_write_name_integer("_UID", 0);
acpigen_write_name_string("_DDN", dev->chip_ops->name);
acpigen_write_STA(acpi_device_status(dev));