diff options
author | Diana Z <dzigterman@chromium.org> | 2021-06-23 14:47:06 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-01 17:15:25 +0000 |
commit | 636ec31a9a2be517eb37d4dad7dfe1a192471745 (patch) | |
tree | ee526ae96a798e07dbc727b88b06da5bb5969aff /common/usbc/usb_pe_drp_sm.c | |
parent | 61dc921ce1b8487e45cd162979350d6849faa016 (diff) | |
download | chrome-ec-636ec31a9a2be517eb37d4dad7dfe1a192471745.tar.gz |
TCPMv2: Notify of disconnect on TC detach
Send a notification that the port has been disconnected when the TC
triggers HOOK_USB_PD_DISCONNECT.
BRANCH=None
BUG=b:188330043
TEST=on storo, verify that disconnect quickly registers in the UI power
status menu
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I758ca918ccd199e3ca2f69aec67323065b48add7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2983992
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usbc/usb_pe_drp_sm.c')
-rw-r--r-- | common/usbc/usb_pe_drp_sm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index e0a364240b..7661e8b2ec 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -1352,6 +1352,9 @@ static void pe_handle_detach(void) /* Reset port events */ pd_clear_events(port, GENMASK(31, 0)); + /* But then set disconnected event */ + pd_notify_event(port, PD_STATUS_EVENT_DISCONNECTED); + /* Tell Policy Engine to invalidate the explicit contract */ pe_invalidate_explicit_contract(port); |