summaryrefslogtreecommitdiff
path: root/src/include/acpi
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-05-27 15:04:21 -0600
committerWerner Zeh <werner.zeh@siemens.com>2021-06-07 05:21:30 +0000
commit6d2bc001ea8ee07be94fd25b91423d76918f001c (patch)
tree7aae0600be18d6ebc0c4ced09d943ce1b3f7cdde /src/include/acpi
parentfec4db954e44a3fd23fedd2f51189c13c985eee9 (diff)
acpi/device: Add ability to generate proper _STA for PowerResource
acpi_device_add_power_res currently generates a `_STA` method hardcoded to ON. This change enables the ability to generate a `_STA` method that queries the status of the GPIOs to determine if the power resource is ON or OFF. BUG=b:184617186 TEST=Dump SSDT table for guybrush Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I91410556db002c620fd9aaa99981457808da93a5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55027 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lance Zhao Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/include/acpi')
-rw-r--r--src/include/acpi/acpi_device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/acpi/acpi_device.h b/src/include/acpi/acpi_device.h
index 301f9b0156..71809eb6d4 100644
--- a/src/include/acpi/acpi_device.h
+++ b/src/include/acpi/acpi_device.h
@@ -456,6 +456,12 @@ struct acpi_power_res_params {
* (_OFF method delay)
*/
unsigned int stop_off_delay_ms;
+
+ /* Write a _STA method that uses the state of the GPIOs to determine if
+ * the PowerResource is ON or OFF. If this is false, the _STA method
+ * will always return ON.
+ */
+ bool use_gpio_for_status;
};
/*