diff options
author | Diana Z <dzigterman@chromium.org> | 2020-09-25 11:46:22 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-05 18:11:32 +0000 |
commit | b0ae00fee75611adf4e265b67d3773b8bc371e50 (patch) | |
tree | 27916dd4622d15c4b19f95ff48e34adfbd260f05 /include/usb_pe_sm.h | |
parent | 0d33970abab4369391ae6636537d1904592adca5 (diff) | |
download | chrome-ec-b0ae00fee75611adf4e265b67d3773b8bc371e50.tar.gz |
TCPMv2: Add framework for per-port events
The AP would like to retrieve events on a per-port basis, so add new
tracking for those events, as well as the capability for non-PD tasks to
retrieve and set those events. For the moment, the code just clears
events on startup and event flags will be added in subsequent CLs.
BRANCH=None
BUG=b:148816435
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I9c2644141b4f5277ee54b4bf2c30087b51a87d8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432454
Diffstat (limited to 'include/usb_pe_sm.h')
-rw-r--r-- | include/usb_pe_sm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h index 0cd3bd86da..6a4aea5415 100644 --- a/include/usb_pe_sm.h +++ b/include/usb_pe_sm.h @@ -166,5 +166,13 @@ const char *pe_get_current_state(int port); */ uint32_t pe_get_flags(int port); +/** + * Sets event for PE layer to report and triggers a notification up to the AP. + * + * @param port USB-C port number + * @param event_mask of bits to set (PD_STATUS_EVENT_* events in ec_commands.h) + */ +void pe_notify_event(int port, uint32_t event_mask); + #endif /* __CROS_EC_USB_PE_H */ |