diff options
author | Aseda Aboagye <aaboagye@google.com> | 2017-11-28 11:02:22 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-12-12 01:05:25 -0800 |
commit | 02e4c2ea9a087a22e49287fbfd71714eab21c7f4 (patch) | |
tree | 824180c02d7c1cd20d81bfcbf135ee8830cd2e6f /include | |
parent | 716fcb123d36a46d8432c1e45d49f6828bba93ff (diff) | |
download | chrome-ec-02e4c2ea9a087a22e49287fbfd71714eab21c7f4.tar.gz |
ppc: sn5s330: Add interrupt handler.
Right now, the only events that are unmasked by default are overcurrent
conditions on PP1. This commit adds a simple interrupt handler and
introduces a board specific callback when the overcurrent status changes
on a port. This way, a board can take whatever action it desires with
the notification.
BUG=b:69139844
BRANCH=None
TEST=Flash zoombini with SN5S330 stuffed. Verify that board boots okay.
TEST=With some extra code to setup the interrupt handler, attempt to
exceed the current limit set, verify that interrupt handler is called.
Reduce the current pulled to under the current limit, verify that the
condition is no longer present.
CQ-DEPEND=CL:797937
Change-Id: Id3321c5703f9608da895be0ed5841f2fb76e734e
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/797936
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usbc_ppc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h index f5b72742d2..83fac5cad9 100644 --- a/include/usbc_ppc.h +++ b/include/usbc_ppc.h @@ -123,4 +123,11 @@ int ppc_vbus_sink_enable(int port, int enable); */ int ppc_vbus_source_enable(int port, int enable); +/** + * Board specific callback when a port overcurrents. + * + * @param port: The Type-C port which overcurrented. + */ +void board_overcurrent_event(int port); + #endif /* !defined(__CROS_EC_USBC_PPC_H) */ |