From b6f6e01bcb8561628af122f2b84c67e53cdc5545 Mon Sep 17 00:00:00 2001 From: Eric Lai Date: Mon, 9 Aug 2021 14:54:00 +0800 Subject: drivers/generic/alc1015: Add HID to support alc1019 ALC1019 will use the ACPI compatible and share the same driver with ALC1015. Add HID to support more compatible ICs. BUG=b:195891240 TEST=ALC1019P driver can probe properly. Signed-off-by: Eric Lai Change-Id: I3e98297f3a39048b24d61e61ca95c60cd2037eb5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56877 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/drivers/generic/alc1015/alc1015.c | 5 ++++- src/drivers/generic/alc1015/chip.h | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/drivers/generic/alc1015/alc1015.c b/src/drivers/generic/alc1015/alc1015.c index 920b8af4bc..ca685d6afb 100644 --- a/src/drivers/generic/alc1015/alc1015.c +++ b/src/drivers/generic/alc1015/alc1015.c @@ -25,7 +25,10 @@ static void alc1015_fill_ssdt(const struct device *dev) acpigen_write_scope(scope); acpigen_write_device(name); - acpigen_write_name_string("_HID", "RTL1015"); + if (config->hid) + acpigen_write_name_string("_HID", config->hid); + else + acpigen_write_name_string("_HID", "RTL1015"); acpigen_write_name_integer("_UID", 0); acpigen_write_name_string("_DDN", dev->chip_ops->name); acpigen_write_STA(acpi_device_status(dev)); diff --git a/src/drivers/generic/alc1015/chip.h b/src/drivers/generic/alc1015/chip.h index 4c01e7ca2e..fa841772ed 100644 --- a/src/drivers/generic/alc1015/chip.h +++ b/src/drivers/generic/alc1015/chip.h @@ -3,6 +3,6 @@ #include struct drivers_generic_alc1015_config { - /* SDMODE GPIO */ - struct acpi_gpio sdb; + const char *hid; /* ACPI _HID */ + struct acpi_gpio sdb; /* SDMODE GPIO */ }; -- cgit v1.2.3