diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2023-01-18 18:14:09 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-07-31 13:59:52 +0000 |
commit | 2ca55f2c187abd0d1c1e41b96c8b89d89b63e9ea (patch) | |
tree | c2761efa2d40496c067662606e6eda83aca9f0b0 /src | |
parent | 64640d3416d7c3b82cdfa10ebda10d34bd33f193 (diff) |
drivers/i2c/generic: Add option to set ACPI subsystem ID
Change-Id: I7c9c938bd20d36be8fdfb0d95bb58a7259650693
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76801
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: CoolStar <coolstarorganization@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/i2c/generic/chip.h | 1 | ||||
-rw-r--r-- | src/drivers/i2c/generic/generic.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h index 0942d00fc1..8e13ffc7bb 100644 --- a/src/drivers/i2c/generic/chip.h +++ b/src/drivers/i2c/generic/chip.h @@ -11,6 +11,7 @@ struct drivers_i2c_generic_config { const char *hid; /* ACPI _HID (required) */ const char *cid; /* ACPI _CID */ + const char *sub; /* ACPI _SUB */ const char *name; /* ACPI Device Name */ const char *desc; /* Device Description */ unsigned int uid; /* ACPI _UID */ diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index d1baeb76f4..1a3ec40c7a 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -83,6 +83,8 @@ void i2c_generic_fill_ssdt(const struct device *dev, acpigen_write_name_string("_HID", config->hid); if (config->cid) acpigen_write_name_string("_CID", config->cid); + if (config->sub) + acpigen_write_name_string("_SUB", config->sub); acpigen_write_name_integer("_UID", config->uid); if (config->desc) acpigen_write_name_string("_DDN", config->desc); |