summaryrefslogtreecommitdiff
path: root/board/zinger
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-13 10:27:58 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-14 03:15:29 +0000
commita989f13843a3e6301262d9c7ed8d3c36141fb94d (patch)
treeaac6c0cb822e81834257e4e73c06756c8e432d36 /board/zinger
parentb34152199d341175877eba293af5bc230f70b226 (diff)
downloadchrome-ec-a989f13843a3e6301262d9c7ed8d3c36141fb94d.tar.gz
zinger: increase discharge timeout and fix fault condition
Increase discharge timeout delay to 275ms, which is the new tSrcSettle time. Also, fix fault condition so that we reset immediately upon receiving a fault. BUG=chrome-os-partner:35330 BRANCH=samus TEST=load on zinger and test with firefly many 20->5V transitions without a discharge error Change-Id: I13bc5d77889a37390603c6922c84b264c77d79ac Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/240399 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/zinger')
-rw-r--r--board/zinger/usb_pd_policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c
index 2e0c8bf4e5..160aed97dc 100644
--- a/board/zinger/usb_pd_policy.c
+++ b/board/zinger/usb_pd_policy.c
@@ -112,7 +112,7 @@ static timestamp_t fault_deadline;
#define OVP_REC_MV(mv) VBUS_MV((mv) * 11 / 10)
/* Maximum discharging delay */
-#define DISCHARGE_TIMEOUT (90*MSEC)
+#define DISCHARGE_TIMEOUT (275*MSEC)
/* Voltage overshoot below the OVP threshold for discharging to avoid OVP */
#define DISCHARGE_OVERSHOOT_MV VBUS_MV(200)
@@ -407,6 +407,7 @@ int pd_board_checks(void)
fault = FAULT_DISCHARGE;
/* reset it after 1 second */
fault_deadline.val = get_time().val + OCP_TIMEOUT;
+ return EC_ERROR_INVAL;
}
/* everything is good *and* the error condition has expired */