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/drivers/i2c/generic/generic.c | |
parent | 77034fa7d4402aab9eef84fc652b0493a2024026 (diff) |
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/drivers/i2c/generic/generic.c')
-rw-r--r-- | src/drivers/i2c/generic/generic.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 13f83935f9..46fff4ac6d 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -142,11 +142,20 @@ void i2c_generic_fill_ssdt(struct device *dev, } /* Power Resource */ - if (config->has_power_resource) - acpi_device_add_power_res( - &config->reset_gpio, config->reset_delay_ms, - &config->enable_gpio, config->enable_delay_ms, - &config->stop_gpio, config->stop_delay_ms); + if (config->has_power_resource) { + const struct acpi_power_res_params power_res_params = { + &config->reset_gpio, + config->reset_delay_ms, + config->reset_off_delay_ms, + &config->enable_gpio, + config->enable_delay_ms, + config->enable_off_delay_ms, + &config->stop_gpio, + config->stop_delay_ms, + config->stop_off_delay_ms + }; + acpi_device_add_power_res(&power_res_params); + } /* Callback if any. */ if (callback) |