diff options
-rw-r--r-- | common/usb_pd_protocol.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 123fbaa475..a5423748f0 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1369,10 +1369,9 @@ static void pd_set_vconn_role(int port, int role) void pd_execute_hard_reset(int port) { - if (pd[port].last_state == PD_STATE_HARD_RESET_SEND) - CPRINTF("C%d HARD RST TX\n", port); - else - CPRINTF("C%d HARD RST RX\n", port); + int hard_rst_tx = pd[port].last_state == PD_STATE_HARD_RESET_SEND; + + CPRINTF("C%d HARD RST %cX\n", port, hard_rst_tx ? 'T' : 'R'); pd[port].msg_id = 0; invalidate_last_message_id(port); @@ -1428,6 +1427,9 @@ void pd_execute_hard_reset(int port) } #endif /* CONFIG_USB_PD_DUAL_ROLE */ + if (!hard_rst_tx) + usleep(PD_T_PS_HARD_RESET); + /* We are a source, cut power */ pd_power_supply_reset(port); pd[port].src_recover = get_time().val + PD_T_SRC_RECOVER; |