diff options
Diffstat (limited to 'zephyr/include/emul/tcpc/emul_tcpci_partner_common.h')
-rw-r--r-- | zephyr/include/emul/tcpc/emul_tcpci_partner_common.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/zephyr/include/emul/tcpc/emul_tcpci_partner_common.h b/zephyr/include/emul/tcpc/emul_tcpci_partner_common.h index f232724ece..dd8909c2ca 100644 --- a/zephyr/include/emul/tcpc/emul_tcpci_partner_common.h +++ b/zephyr/include/emul/tcpc/emul_tcpci_partner_common.h @@ -12,16 +12,17 @@ #ifndef __EMUL_TCPCI_PARTNER_COMMON_H #define __EMUL_TCPCI_PARTNER_COMMON_H -#include <zephyr/drivers/emul.h> -#include <zephyr/kernel.h> -#include <zephyr/sys/atomic.h> -#include <stdbool.h> -#include <stdint.h> - #include "ec_commands.h" #include "emul/tcpc/emul_tcpci.h" #include "usb_pd.h" +#include <stdbool.h> +#include <stdint.h> + +#include <zephyr/drivers/emul.h> +#include <zephyr/kernel.h> +#include <zephyr/sys/atomic.h> + /** * @brief Common code used by TCPCI partner device emulators * @defgroup tcpci_partner Common code for TCPCI partner device emulators @@ -147,6 +148,9 @@ struct tcpci_partner_data { /* SVID of entered mode (0 if no mode is entered) */ uint16_t entered_svid; + enum tcpc_cc_voltage_status tcpm_cc1; + enum tcpc_cc_voltage_status tcpm_cc2; + /* VDMs with which the partner responds to discovery REQs. The VDM * buffers include the VDM header, and the VDO counts include 1 for the * VDM header. This structure has space for the mode response for a @@ -183,6 +187,8 @@ struct tcpci_partner_data { */ bool have_response[PD_BATT_MAX]; } battery_capabilities; + /* Used to control accept/reject for partner port of Enter_USB msg */ + bool enter_usb_accept; /* * Cable which is "plugged in" to this port partner @@ -311,6 +317,9 @@ struct tcpci_partner_extension_ops { void (*soft_reset)(struct tcpci_partner_extension *ext, struct tcpci_partner_data *common_data); + void (*control_change)(struct tcpci_partner_extension *ext, + struct tcpci_partner_data *common_data); + /** * @brief Function called when partner emulator is disconnected from * TCPM |