diff options
author | Vitaly Rodionov <vitalyr@opensource.cirrus.com> | 2022-05-24 14:58:01 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@tutanota.com> | 2022-05-28 04:13:35 +0000 |
commit | 74782cb2f4601f5b67c6b169a7ab9b1d0778c638 (patch) | |
tree | 2eed279d88127aa703e31f89c0e17d0277eaa91a /src/drivers/i2c | |
parent | 8f6dd2a4bd8146b9167ec4d2251af1d3045398f2 (diff) |
drivers/i2c/cs35l53: Add device description and UID
BUG=b:207333035
BRANCH=none
TEST=built and verified speaker
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Change-Id: I0dd39760dc5f44f46838c07d2e52946edc2a6d7e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64638
Reviewed-by: Vitaly Rodionov <vitaly.rodionov@cirrus.corp-partner.google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c')
-rw-r--r-- | src/drivers/i2c/cs35l53/chip.h | 6 | ||||
-rw-r--r-- | src/drivers/i2c/cs35l53/cs35l53.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/drivers/i2c/cs35l53/chip.h b/src/drivers/i2c/cs35l53/chip.h index 9aeb874011..8631666e0c 100644 --- a/src/drivers/i2c/cs35l53/chip.h +++ b/src/drivers/i2c/cs35l53/chip.h @@ -48,6 +48,12 @@ struct drivers_i2c_cs35l53_config { const char *sub; /* SUB ID to uniquely identify system */ + /* Device Description */ + const char *desc; + + /* Identifier for chips */ + uint32_t uid; + /* Interrupt configuration */ struct acpi_irq irq; diff --git a/src/drivers/i2c/cs35l53/cs35l53.c b/src/drivers/i2c/cs35l53/cs35l53.c index 1909bef7b5..9857203b8c 100644 --- a/src/drivers/i2c/cs35l53/cs35l53.c +++ b/src/drivers/i2c/cs35l53/cs35l53.c @@ -33,8 +33,11 @@ static void cs35l53_fill_ssdt(const struct device *dev) acpigen_write_scope(scope); acpigen_write_device(acpi_device_name(dev)); acpigen_write_name_string("_HID", CS35L53_ACPI_HID); - acpigen_write_name_integer("_UID", 0); - acpigen_write_name_string("_DDN", dev->chip_ops->name); + acpigen_write_name_integer("_UID", config->uid); + if (config->desc == NULL) + acpigen_write_name_string("_DDN", dev->chip_ops->name); + else + acpigen_write_name_string("_DDN", config->desc); acpigen_write_name_string("_SUB", config->sub); acpigen_write_STA(acpi_device_status(dev)); |