drivers/generic/max98357a: Allow custom _HID from config
Add HID field in max98357a_config and allow mainboards to set it. Signed-off-by: Aamir Bohra <aamir.bohra@intel.com> Change-Id: I22d2d078a9a4eb6ab330da8439737ff5133086d4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/39286 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
12b835050f
commit
a1c82c5ebe
@@ -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));
|
||||
|
Reference in New Issue
Block a user