summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-20 10:27:02 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-20 22:10:30 +0000
commitb1f0de7b37e2730836b056c1672739b123d403e6 (patch)
treee59782027f345c1cd171730b71ed41a3b0d361f5
parentd7f40b91ad2d8bf67e28b8942befdd2a1eadeb3a (diff)
downloadchrome-ec-b1f0de7b37e2730836b056c1672739b123d403e6.tar.gz
zinger: increase time from PD RX edge to allowing sleep to 100ms
Increase the time from the last USB PD RX edge to allow deep sleep to 100ms to allow us to receive retries if we miss the first attempt. BUG=chrome-os-partner:34624 BRANCH=samus TEST=make -j buildall Change-Id: Id4dd5614b52c9bcd97997e95b0c5f21fbd9b2cf3 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/241954 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/zinger/usb_pd_policy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c
index 70258e73a5..cb1e3b743a 100644
--- a/board/zinger/usb_pd_policy.c
+++ b/board/zinger/usb_pd_policy.c
@@ -117,6 +117,9 @@ static timestamp_t fault_deadline;
/* Voltage overshoot below the OVP threshold for discharging to avoid OVP */
#define DISCHARGE_OVERSHOOT_MV VBUS_MV(200)
+/* Time to wait after last RX edge interrupt before allowing deep sleep */
+#define PD_RX_SLEEP_TIMEOUT (100*MSEC)
+
/* ----- output voltage discharging ----- */
/* expiration date of the discharge */
@@ -333,7 +336,7 @@ int pd_board_checks(void)
#endif
/* if it's been a while since last RX edge, then allow deep sleep */
- if (get_time_since_last_edge(0) > PD_RX_TRANSITION_WINDOW)
+ if (get_time_since_last_edge(0) > PD_RX_SLEEP_TIMEOUT)
enable_sleep(SLEEP_MASK_USB_PD);
vbus_volt = adc_read_channel(ADC_CH_V_SENSE);