summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2019-03-28 10:43:52 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-25 15:17:13 +0000
commit683ff8b18f4af6134378085dc87f78e14888839c (patch)
tree6901b79317e8026f2ef602c07d2663b659c6f895 /include
parent2aff1143e02423c38c59137dec2dce0dcb052360 (diff)
downloadchrome-ec-683ff8b18f4af6134378085dc87f78e14888839c.tar.gz
common: pd_policy: Add notification for DP AltMode
This commit simply adds a notification that can be called when the device enters DisplayPort Alternate mode or a DP attention VDM is received. Calling the notification will send a MODE_CHANGE host event which may wake the AP. BUG=chromium:786721 BRANCH=firmware-grunt-11031.B TEST=With other PD Policies patches, flash grunt and run faft_ec&pd Change-Id: Iaa221e69060a7d1015f7c1e2f6f053e6810a674a Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1666366 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213567 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h8
-rw-r--r--include/usb_pd.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 20171bed4e..7478371fdf 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -605,7 +605,13 @@ enum host_event_code {
/* EC desires to change state of host-controlled USB mux */
EC_HOST_EVENT_USB_MUX = 28,
- /* TABLET/LAPTOP mode or detachable base attach/detach event */
+ /*
+ * The device has changed "modes". This can be one of the following:
+ *
+ * - TABLET/LAPTOP mode
+ * - detachable base attach/detach event
+ * - DisplayPort Alternate Mode entry
+ */
EC_HOST_EVENT_MODE_CHANGE = 29,
/* Keyboard recovery combo with hardware reinitialization */
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 322e3055b6..0283c62791 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -1847,6 +1847,12 @@ int pd_capable(int port);
*/
int pd_is_vbus_present(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.
+ */
+void pd_notify_dp_alt_mode_entry(void);
+
/* ----- Logging ----- */
#ifdef CONFIG_USB_PD_LOGGING
/**