diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2016-08-23 15:02:10 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-25 01:45:26 -0700 |
commit | 6fefca3d6acc0ea5b5adebabd8593ed17265f5c8 (patch) | |
tree | 326092280abe01d1cf15b7f400ca47624df55a3a /include/power.h | |
parent | 3071b82b5847396136b19acd8c2aa3f4e8f6cd42 (diff) | |
download | chrome-ec-6fefca3d6acc0ea5b5adebabd8593ed17265f5c8.tar.gz |
power: rk3399: Debounce PGOOD_AP signal
PGOOD_AP may go low for a period < 100ms during regulator output voltage
transitions, so ignore such pulses.
BRANCH=None
BUG=chrome-os-partner:54814
TEST=On kevin, verify suspend / resume succeeds for 10 cycles.
Change-Id: I5b6240a570472e1ea74de6e5f2341472ea7afe6b
Reviewed-on: https://chromium-review.googlesource.com/374524
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Shunqian Zheng <zhengsq@rock-chips.com>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/power.h')
-rw-r--r-- | include/power.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/power.h b/include/power.h index ab8d7ac46a..b81a952156 100644 --- a/include/power.h +++ b/include/power.h @@ -68,7 +68,7 @@ uint32_t power_get_signals(void); int power_has_signals(uint32_t want); /** - * Wait for power input signals to be present + * Wait for power input signals to be present using default timeout * * @param want Mask of signals which must be present (one or more * POWER_SIGNAL_MASK()s). If want=0, stops waiting for @@ -79,6 +79,18 @@ int power_has_signals(uint32_t want); int power_wait_signals(uint32_t want); /** + * Wait for power input signals to be present + * + * @param want Mask of signals which must be present (one or more + * POWER_SIGNAL_MASK()s). If want=0, stops waiting for + * signals. + * @param timeout Timeout in usec to wait for signals to be present. + * @return EC_SUCCESS when all inputs are present, or ERROR_TIMEOUT if timeout + * before reaching the desired state. + */ +int power_wait_signals_timeout(uint32_t want, int timeout); + +/** * Set the low-level power chipset state. * * @param new_state New chipset state. |