From 3d5f117f918c0e9ade31af8c2f2c37b5a18ab32a Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Fri, 16 May 2014 21:26:37 -0700 Subject: 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 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 Tested-by: Vincent Palatin Reviewed-by: Alec Berg --- board/zinger/usb_pd_policy.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.2.1