summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuibin Chang <Ruibin.Chang@ite.com.tw>2018-11-13 15:23:39 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-12-18 21:27:43 +0000
commit98c53d5a1ecb9b696634c5ffd7b774653afd9c14 (patch)
treed1a506c6cd7df19024cc1d53e59ee38c048b8927
parent8904b5a6cf3b33ba81ab2e11d9050687e3897c4a (diff)
downloadchrome-ec-98c53d5a1ecb9b696634c5ffd7b774653afd9c14.tar.gz
common/usb_pd_protocol: Fix TryWait.SNK to Unattached.SNK timeout value
When state transits from TryWait.SNK to Unattached.SNK, the timeout value is 10~20ms (tPDDebounce). This define in USB Type-C 1.3 spec Figure 4-16. BRANCH=None BUG=None TEST=GRL USBPD test Change-Id: If736daf1ef9e74f07a571a2f1adb12a928415c2b Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/1333217 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1383313 Commit-Queue: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Trybot-Ready: Jett Rink <jettrink@chromium.org>
-rw-r--r--common/usb_pd_protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 7a8634e174..6c7f2432b9 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -2883,7 +2883,7 @@ void pd_task(void *u)
tcpm_set_cc(port, TYPEC_CC_RD);
next_role_swap = get_time().val + PD_T_DRP_SNK;
pd[port].try_src_marker = get_time().val
- + PD_T_TRY_WAIT;
+ + PD_T_DEBOUNCE;
/* Swap states quickly */
timeout = 2*MSEC;
@@ -4055,7 +4055,7 @@ void pd_task(void *u)
tcpm_set_cc(port, TYPEC_CC_RD);
/* Set timer for TryWait.SNK state */
pd[port].try_src_marker = get_time().val
- + PD_T_TRY_WAIT;
+ + PD_T_DEBOUNCE;
/* Advance to TryWait.SNK state */
set_state(port,
PD_STATE_SNK_DISCONNECTED);