summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/i2c/tpm/chip.c')
-rw-r--r--src/drivers/i2c/tpm/chip.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index 07791c33a4..3a2f8aa544 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -11,6 +11,7 @@
static void i2c_tpm_fill_ssdt(const struct device *dev)
{
+ struct acpi_dp *dsd;
struct drivers_i2c_tpm_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
struct acpi_i2c i2c = {
@@ -47,6 +48,21 @@ static void i2c_tpm_fill_ssdt(const struct device *dev)
acpigen_write_resourcetemplate_footer();
+ /* _DSD, Device-Specific Data */
+ dsd = acpi_dp_new_table("_DSD");
+ switch (config->power_managed_mode) {
+ case TPM_FIRMWARE_POWER_MANAGED:
+ acpi_dp_add_integer(dsd, "firmware-power-managed", 1);
+ break;
+ case TPM_KERNEL_POWER_MANAGED:
+ acpi_dp_add_integer(dsd, "firmware-power-managed", 0);
+ break;
+ case TPM_DEFAULT_POWER_MANAGED:
+ default:
+ /* Leave firmware-power-managed unset */
+ }
+ acpi_dp_write(dsd);
+
acpigen_pop_len(); /* Device */
acpigen_pop_len(); /* Scope */