diff options
Diffstat (limited to 'driver/tcpm/it83xx.c')
-rw-r--r-- | driver/tcpm/it83xx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c index 3cad1ef4a7..22a0b0075d 100644 --- a/driver/tcpm/it83xx.c +++ b/driver/tcpm/it83xx.c @@ -571,10 +571,11 @@ static int it83xx_tcpm_set_rx_enable(int port, int enable) USBPD_DISABLE_BMC_PHY(port); } - /* If any PD port is connected, then disable deep sleep */ - for (i = 0; i < board_get_usb_pd_port_count(); ++i) - if (IT83XX_USBPD_GCR(i) | USBPD_REG_MASK_BMC_PHY) + /* If any PD port Rx is enabled, then disable deep sleep */ + for (i = 0; i < board_get_usb_pd_port_count(); ++i) { + if (IT83XX_USBPD_GCR(i) & USBPD_REG_MASK_BMC_PHY) break; + } if (i == board_get_usb_pd_port_count()) enable_sleep(SLEEP_MASK_USB_PD); |