diff options
author | Aseda Aboagye <aaboagye@google.com> | 2019-07-02 11:11:37 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-17 23:58:23 +0000 |
commit | 5122fe8bfba938c9c8e32930bc560b499e331420 (patch) | |
tree | 5cd5645e66e0f146823b2eaad8fc075d87b3eaca /include | |
parent | 3cc417a240ce917e0e5f55aadcd5a4cbccc8f47c (diff) | |
download | chrome-ec-5122fe8bfba938c9c8e32930bc560b499e331420.tar.gz |
pd_policy: Change DP AltMode event from host event to MKBP.
Previously, the EC could notify the AP that it had entered into
DisplayPort Alternate mode by sending a MODE_CHANGE host event.
However, there was no mechanism to disable that functionality if desired
without effecting the other MODE_CHANGE events (i.e. - base
attach/detach). By changing the DisplayPort Alternate mode entry to an
MKBP event, we can have more granularity and only affect this single
event.
- This commit adds a new MKBP event, EC_MKBP_EVENT_DP_ALT_MODE_ENTERED.
- The commit also changes the DP AltMode entry notification from sending
a MODE_CHANGE host event to this new MKBP event.
BUG=chromium:786721
BRANCH=None
TEST=Build and flash nocturne, verify that system still wakes up on
DisplayPort Alternate Mode entry.
Change-Id: Ia5f294b26701c3c98c9b7f948fc693d26234c835
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685787
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 4 | ||||
-rw-r--r-- | include/usb_pd.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index fdcab353e0..5e78cae51c 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -622,7 +622,6 @@ enum host_event_code { * * - TABLET/LAPTOP mode * - detachable base attach/detach event - * - DisplayPort Alternate Mode entry */ EC_HOST_EVENT_MODE_CHANGE = 29, @@ -3472,6 +3471,9 @@ enum ec_mkbp_event { /* Send an incoming CEC message to the AP */ EC_MKBP_EVENT_CEC_MESSAGE = 9, + /* We have entered DisplayPort Alternate Mode on a Type-C port. */ + EC_MKBP_EVENT_DP_ALT_MODE_ENTERED = 10, + /* Number of MKBP events */ EC_MKBP_EVENT_COUNT, }; diff --git a/include/usb_pd.h b/include/usb_pd.h index 3dba8483d0..5cd7eb8851 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1993,7 +1993,7 @@ int pd_is_debug_acc(int port); /* * Notify the AP that we have entered into DisplayPort Alternate Mode. This - * sets a MODE_CHANGE host event which may wake the AP. + * sets a DP_ALT_MODE_ENTERED MKBP event which may wake the AP. */ void pd_notify_dp_alt_mode_entry(void); |