summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-11-21 15:00:26 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-22 09:33:47 +0000
commit94082f6f53f1d9c124401139730c033d37bd9cac (patch)
tree41747927c97eb377e31b887aa8352b43a141f20a
parentbebce8dca1fe3625b789f82ae171c254f0ae413d (diff)
downloadchrome-ec-94082f6f53f1d9c124401139730c033d37bd9cac.tar.gz
pd: change timeout for exiting sink hard reset recovery
In sink hard reset recovery, when VBUS finally goes high, go to SNK_DISCOVERY quickly so that we can set our SINK_WAIT_CAP timer. BUG=none BRANCH=samus TEST=tested with zinger. when samus sends hard reset, it goes to SNK_DISCOVERY quickly after VBUS goes high. Change-Id: Ie5b3ed95ea9e0c405861be71bd694b057de289d0 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/231397 Reviewed-by: Vincent Palatin <vpalatin@google.com>
-rw-r--r--common/usb_pd_protocol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 5d6107c1e8..abc07ae84e 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -1906,9 +1906,11 @@ void pd_task(void)
}
if (pd_snk_is_vbus_provided(port) &&
- snk_hard_reset_vbus_off)
+ snk_hard_reset_vbus_off) {
/* VBUS went high again */
set_state(port, PD_STATE_SNK_DISCOVERY);
+ timeout = 10*MSEC;
+ }
/*
* Don't need to set timeout because VBUS changing