summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-05-16 21:26:37 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-21 20:36:10 +0000
commit3d5f117f918c0e9ade31af8c2f2c37b5a18ab32a (patch)
tree603fe7ab188705e41dbc6648a4d8642fd673e6f9
parentf52b23e96423fa0447013d58da1c6677ac8ae9f8 (diff)
downloadchrome-ec-3d5f117f918c0e9ade31af8c2f2c37b5a18ab32a.tar.gz
zinger: ensure we re-enable the output once a fault is cleared
When a fault is cleared, reset the PD state and communicate, so that we re-enable the output and negociate a new voltage. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=on Zinger connected to Firefly, trigger an OCP (using an electronic load) and see that the output is re-enabled once the OCP is cleared after 1 second. Change-Id: I3199d2c8675ab43958321378fd7f65ac383468cc Reviewed-on: https://chromium-review.googlesource.com/200338 Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r--board/zinger/usb_pd_policy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c
index a23328bc3a..c8dfcb0ea2 100644
--- a/board/zinger/usb_pd_policy.c
+++ b/board/zinger/usb_pd_policy.c
@@ -219,6 +219,11 @@ int pd_board_checks(void)
if ((fault != FAULT_OK) && (get_time().val > fault_deadline.val)) {
fault = FAULT_OK;
debug_printf("Reset fault\n");
+ /*
+ * Reset the PD state and communication on both side,
+ * so we can now re-negociate a voltage.
+ */
+ return EC_ERROR_INVAL;
}
return EC_SUCCESS;