summaryrefslogtreecommitdiff
path: root/include/usb_common.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2020-06-03 14:52:27 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-25 03:55:36 +0000
commitd945012134ae499ff8903739d5472f5cdd51703a (patch)
tree18d0f4fa130e1888b220d2832700a9a023db0582 /include/usb_common.h
parentb38f3970ef0ea24c77a8ceeddd0f3eae3692c702 (diff)
downloadchrome-ec-d945012134ae499ff8903739d5472f5cdd51703a.tar.gz
TCPMV2: Add support for sending Alert Messages
Add support for sending Alert OVC and OVP messages BRANCH=none BUG=b:117854867 TEST=make -j buildall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ia436c8869880897ea9af0c2c2b0d6e9288831a8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2229285 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/usb_common.h')
-rw-r--r--include/usb_common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/usb_common.h b/include/usb_common.h
index 078f4b0029..180ebbcc95 100644
--- a/include/usb_common.h
+++ b/include/usb_common.h
@@ -179,4 +179,14 @@ int pd_get_saved_port_flags(int port, uint8_t *flags);
* @param do_set value written to the BB Ram flag
*/
void pd_update_saved_port_flags(int port, uint8_t flag, uint8_t do_set);
+
+/**
+ * Build PD alert message
+ *
+ * @param msg pointer where message is stored
+ * @param len pointer where length of message is stored in bytes
+ * @param pr current PD power role
+ * @return EC_SUCCESS on success else EC_ERROR_INVAL
+ */
+int pd_build_alert_msg(uint32_t *msg, uint32_t *len, enum pd_power_role pr);
#endif /* __CROS_EC_USB_COMMON_H */