diff options
author | Shelley Chen <shchen@google.com> | 2018-04-26 13:52:30 -0700 |
---|---|---|
committer | Shelley Chen <shchen@google.com> | 2018-05-02 20:44:24 +0000 |
commit | a0603397740165cfa13a250851f0213e9035cd5e (patch) | |
tree | 28c962d0a1c818680a77889b807786827d3346d7 /src/arch/x86/include | |
parent | 77034fa7d4402aab9eef84fc652b0493a2024026 (diff) | |
download | coreboot-a0603397740165cfa13a250851f0213e9035cd5e.tar.xz |
src/drivers: Add reset/enable/stop_off_ms variables to ACPI devices
Some touchscreens need to adhere to certain timings during the power
off sequence as well as during the power on sequence. Adding
reset_off_delay_ms, enable_off_delay_ms, and stop_off_delay_ms to
accommodate these devices.
BUG=b:78311818
BRANCH=None
TEST=./util/abuild/abuild -p none -t google/poppy -x -a
Change-Id: Idb4a5dbe56eee4749d2f2b514e92c28fb2c6078f
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/25882
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r-- | src/arch/x86/include/arch/acpi_device.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index 4361c740c9..33f3f8687d 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -315,6 +315,40 @@ struct acpi_spi { /* Write SPI Bus descriptor to SSDT AML output */ void acpi_device_write_spi(const struct acpi_spi *spi); +/* GPIO/timing information for the power on/off sequences */ +struct acpi_power_res_params { + /* GPIO used to take device out of reset or to put it into reset. */ + struct acpi_gpio *reset_gpio; + /* Delay to be inserted after device is taken out of reset. + * (_ON method delay) + */ + unsigned int reset_delay_ms; + /* Delay to be inserted after device is put into reset. + * (_OFF method delay) + */ + unsigned int reset_off_delay_ms; + /* GPIO used to enable device. */ + struct acpi_gpio *enable_gpio; + /* Delay to be inserted after device is enabled. + * (_ON method delay) + */ + unsigned int enable_delay_ms; + /* Delay to be inserted after device is disabled. + * (_OFF method delay) + */ + unsigned int enable_off_delay_ms; + /* GPIO used to stop operation of device. */ + struct acpi_gpio *stop_gpio; + /* Delay to be inserted after disabling stop. + * (_ON method delay) + */ + unsigned int stop_delay_ms; + /* Delay to be inserted after enabling stop. + * (_OFF method delay) + */ + unsigned int stop_off_delay_ms; +}; + /* * Add a basic PowerResource block for a device that includes * GPIOs to control enable, reset and stop operation of the device. Each @@ -324,10 +358,7 @@ void acpi_device_write_spi(const struct acpi_spi *spi); * Enable - Enable / disable power to device. * Stop - Stop / start operation of device. */ -void acpi_device_add_power_res( - struct acpi_gpio *reset, unsigned int reset_delay_ms, - struct acpi_gpio *enable, unsigned int enable_delay_ms, - struct acpi_gpio *stop, unsigned int stop_delay_ms); +void acpi_device_add_power_res(const struct acpi_power_res_params *params); /* * Writing Device Properties objects via _DSD |