From bd73dbbc38649bd487a44b0bb49fdaa19a248634 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Fri, 17 Feb 2017 17:05:03 -0800 Subject: acpi_device: Move power resource function to generic code Move the function that adds a power resource block from i2c/generic to the acpi device code at src/arch/x86/acpi_device.c so it can be used by more drivers. BUG=chrome-os-partner:61233 TEST=verify SSDT table generation is unchanged Change-Id: I0ffb61a4f46028cbe912e85c0124d9f5200b9c76 Signed-off-by: Duncan Laurie Reviewed-on: https://review.coreboot.org/18391 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/arch/x86/include/arch/acpi_device.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index aba5c2d1a6..7d4cb8fd89 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -239,6 +239,15 @@ struct acpi_spi { /* Write SPI Bus descriptor to SSDT AML output */ void acpi_device_write_spi(const struct acpi_spi *spi); +/* + * Add a basic PowerResource block for a device that includes + * GPIOs for enable and/or reset control of the device. Each + * GPIO is optional, but at least one must be provided. + */ +void acpi_device_add_power_res( + struct acpi_gpio *reset, unsigned reset_delay_ms, + struct acpi_gpio *enable, unsigned enable_delay_ms); + /* * Writing Device Properties objects via _DSD * -- cgit v1.2.3