summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpci.c
diff options
context:
space:
mode:
authorRuibin Chang <ruibin.chang@ite.com.tw>2020-07-07 15:42:20 +0800
committerCommit Bot <commit-bot@chromium.org>2020-07-14 06:46:05 +0000
commit1f73f33656bafa76680be4375e3c9f362d5d5c19 (patch)
tree2409a48a3427c1946dc4266d6783f97bb8ed38bf /driver/tcpm/tcpci.c
parentba4b10a78f8da08a56651eebf6941571a0d1d751 (diff)
downloadchrome-ec-1f73f33656bafa76680be4375e3c9f362d5d5c19.tar.gz
driver/tcpm: set PD_EVENT_RX_HARD_RESET event when receive hard reset
When we receive hard reset, we should do Vbus on-off cycle and should keep cc connection. So I change the event setting from PD_EVENT_TCPC_RESET to PD_EVENT_RX_HARD_RESET for ITE TCPC. Stand alone TCPCs also use hard reset event instead of calling pd_execute_hard_reset(), because waked up pd_task() may have chance setting to other state. BRANCH=None BUG=b:159394180 TEST=On board reef_it8320, and it81202_pdevb: 1.TCPMv1: Rx Hard reset -> done Vbus cycle, and keep cc connection, When we're SRC and SNK. 2.TCPMv2: Rx Hard reset -> done Vbus cycle, and keep cc connection, When we're SRC and SNK. Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Change-Id: Ie94757580e8fed4fb33896f9c1e071def49ff03d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2284504 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpci.c')
-rw-r--r--driver/tcpm/tcpci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index 653d29e437..99860407a5 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -1180,8 +1180,7 @@ void tcpci_tcpc_alert(int port)
if (alert & TCPC_REG_ALERT_RX_HARD_RST) {
/* hard reset received */
CPRINTS("C%d Hard Reset received", port);
- pd_execute_hard_reset(port);
- pd_event |= TASK_EVENT_WAKE;
+ pd_event |= PD_EVENT_RX_HARD_RESET;
}
/* USB TCPCI Spec R2 V1.1 Section 4.7.3 Step 2