From 6d2bc001ea8ee07be94fd25b91423d76918f001c Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Thu, 27 May 2021 15:04:21 -0600 Subject: 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 Change-Id: I91410556db002c620fd9aaa99981457808da93a5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55027 Tested-by: build bot (Jenkins) Reviewed-by: Lance Zhao Reviewed-by: Tim Wawrzynczak --- src/include/acpi/acpi_device.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/acpi') diff --git a/src/include/acpi/acpi_device.h b/src/include/acpi/acpi_device.h index 301f9b0156bc..71809eb6d46e 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; }; /* -- cgit v1.2.3