diff options
Diffstat (limited to 'include/usb_pd_dpm.h')
-rw-r--r-- | include/usb_pd_dpm.h | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/include/usb_pd_dpm.h b/include/usb_pd_dpm.h index 391e7ed246..083ef216b6 100644 --- a/include/usb_pd_dpm.h +++ b/include/usb_pd_dpm.h @@ -1,4 +1,4 @@ -/* Copyright 2020 The Chromium OS Authors. All rights reserved. +/* Copyright 2020 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -51,7 +51,7 @@ void dpm_data_reset_complete(int port); * @param vdm The VDM payload of the ACK */ void dpm_vdm_acked(int port, enum tcpci_msg_type type, int vdo_count, - uint32_t *vdm); + uint32_t *vdm); /* * Informs the DPM that a VDM NAK was received. Also applies when a VDM request @@ -63,7 +63,7 @@ void dpm_vdm_acked(int port, enum tcpci_msg_type type, int vdo_count, * @param vdm_cmd The VDM command of the request */ void dpm_vdm_naked(int port, enum tcpci_msg_type type, uint16_t svid, - uint8_t vdm_cmd); + uint8_t vdm_cmd); /* * Drives the Policy Engine through entry/exit mode process @@ -131,6 +131,20 @@ int dpm_get_source_pdo(const uint32_t **src_pdo, const int port); int dpm_get_source_current(const int port); /* + * Report we've been asked to enter BIST Shared Test Mode + * + * @param port USB-C port number + */ +void dpm_bist_shared_mode_enter(int port); + +/* + * Report we've been asked to exit BIST Shared Test Mode + * + * @param port USB-C port number + */ +void dpm_bist_shared_mode_exit(int port); + +/* * Build SOP Status Data Block (SDB) * * @param port USB-C port number @@ -139,6 +153,14 @@ int dpm_get_source_current(const int port); */ int dpm_get_status_msg(int port, uint8_t *msg, uint32_t *len); +/* + * DPM function to handle a received alert message + * + * @param port USB-C port number + * @param ado Alert Data Object (ado) received from partner + */ +void dpm_handle_alert(int port, uint32_t ado); + /* Enum for modules to describe to the DPM their setup status */ enum dpm_msg_setup_status { MSG_SETUP_SUCCESS, @@ -147,4 +169,9 @@ enum dpm_msg_setup_status { MSG_SETUP_MUX_WAIT, }; -#endif /* __CROS_EC_USB_DPM_H */ +/* Enum to describe current state of connected USB PD buttons */ +enum dpm_pd_button_state { + DPM_PD_BUTTON_IDLE, + DPM_PD_BUTTON_PRESSED, +}; +#endif /* __CROS_EC_USB_DPM_H */ |