summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-05-12 17:01:30 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-05-14 08:54:48 +0000
commit052c96348576b292b9a9b506208641ec500035c0 (patch)
treecc4f02b2834f5f03b71af726b6d310bc65e5e827
parent2ea6c4e98779449aeab91770e17bf4efa80bbc6d (diff)
acpi: Add acpigen_write_thermal_zone
BUG=b:186166365 TEST=Compiles Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Icf88477143049119036c00276f9a01985dc0b4d3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54131 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lance Zhao Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
-rw-r--r--src/acpi/acpigen.c7
-rw-r--r--src/include/acpi/acpigen.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index 5c8c1b98c1..9818dc296c 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -781,6 +781,13 @@ void acpigen_write_device(const char *name)
acpigen_emit_namestring(name);
}
+void acpigen_write_thermal_zone(const char *name)
+{
+ acpigen_emit_ext_op(THERMAL_ZONE_OP);
+ acpigen_write_len_f();
+ acpigen_emit_namestring(name);
+}
+
void acpigen_write_STA(uint8_t status)
{
/*
diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h
index 0e8d29a81f..2d0bb77d79 100644
--- a/src/include/acpi/acpigen.h
+++ b/src/include/acpi/acpigen.h
@@ -338,6 +338,11 @@ inline void acpigen_write_device_end(void)
{
acpigen_pop_len();
}
+void acpigen_write_thermal_zone(const char *name);
+inline void acpigen_write_thermal_zone_end(void)
+{
+ acpigen_pop_len();
+}
void acpigen_write_LPI_package(u64 level, const struct acpi_lpi_state *states, u16 nentries);
void acpigen_write_PPC(u8 nr);
void acpigen_write_PPC_NVS(void);