summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpci.c
diff options
context:
space:
mode:
authorWu-Cheng Li <wuchengli@chromium.org>2020-07-24 07:59:04 +0000
committerWu-Cheng Li <wuchengli@chromium.org>2020-07-24 10:43:49 +0000
commit87d418f357867ab863b1c090214b94c2a56929e2 (patch)
tree1194d1f7fa77105c08e3a9752e8e58d95ac1bd75 /driver/tcpm/tcpci.c
parent87f63dc7a0c5b13a46e453a7d5e3747ffa8925b9 (diff)
downloadchrome-ec-87d418f357867ab863b1c090214b94c2a56929e2.tar.gz
Revert "TCPCI: Check for failed i2c write before using alert register"
This reverts commit ef356b8e6b9fcf665e67a9599323ad0af74eea08. Reason for revert: broke many postsubmit builders. BUG=chromium:1109110 Original change's description: > TCPCI: Check for failed i2c write before using alert register > > If the read to the alert register fails, bail on the alert processing > since there is no valid data to work with. > > BRANCH=None > BUG=b:161765813,b:160973127 > TEST=on waddledoo, ensure non-error path still works > > Signed-off-by: Diana Z <dzigterman@chromium.org> > Change-Id: I69fff30967132da29d34a41b5a9c4631afb0545d > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2313421 > Reviewed-by: Denis Brockus <dbrockus@chromium.org> Bug: b:161765813 Bug: b:160973127 Change-Id: Ia82f61db7c465f380296e0239206219e4283b231 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2317327 Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpci.c')
-rw-r--r--driver/tcpm/tcpci.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index 3437037597..ae03f7e097 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -1087,10 +1087,7 @@ void tcpci_tcpc_alert(int port)
uint32_t pd_event = 0;
/* Read the Alert register from the TCPC */
- if (tcpm_alert_status(port, &alert)) {
- CPRINTS("C%d: Failed to read alert register", port);
- return;
- }
+ tcpm_alert_status(port, &alert);
/* Get Extended Alert register if needed */
if (alert & TCPC_REG_ALERT_ALERT_EXT)