summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2019-12-03 12:31:56 -0700
committerCommit Bot <commit-bot@chromium.org>2019-12-06 00:16:46 +0000
commitfbe977e7a603bf4d4e60854f462fecf496bec3c6 (patch)
tree9dcfb5b44f2d3da1990bdaf45409a61884004d73 /common
parentcbdbbd39df55ecd582fbcd4f566015bcc2c72770 (diff)
downloadchrome-ec-fbe977e7a603bf4d4e60854f462fecf496bec3c6.tar.gz
ppc: Use hard reset to recover from CC overvoltage
When sn5s330 PPC detects CC overvoltage, recover via hard reset and don't enable PP2 sink FET directly. Also clean up the interrupt unmasking in sn5s330_init(). BUG=b:144892533 BRANCH=grunt TEST=Do ESD test to trigger CC1/CC2 OVP, device recovers to sink Change-Id: I662bf164b55508be4d5cc1b3ad639c9613bd1935 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1949264 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/usb_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/usb_common.c b/common/usb_common.c
index af77e65ebc..033577249f 100644
--- a/common/usb_common.c
+++ b/common/usb_common.c
@@ -440,4 +440,9 @@ void pd_handle_overcurrent(int port)
hook_call_deferred(&re_enable_ports_data, SECOND);
}
+void pd_handle_cc_overvoltage(int port)
+{
+ pd_send_hard_reset(port);
+}
+
#endif /* CONFIG_USBC_PPC */