summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 1d8b82f19d..180f353a4d 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -467,6 +467,11 @@ static inline void set_state(int port, enum pd_states next_state)
#ifdef CONFIG_USB_PD_ALT_MODE_DFP
pd_dfp_exit_mode(port, 0, 0);
#endif
+ /*
+ * Indicate that the port is disconnected so the board
+ * can restore state from any previous data swap.
+ */
+ pd_execute_data_swap(port, PD_ROLE_DISCONNECTED);
#ifdef CONFIG_USBC_SS_MUX
usb_mux_set(port, TYPEC_MUX_NONE, USB_SWITCH_DISCONNECT,
pd[port].polarity);