diff options
-rw-r--r-- | board/zinger/usb_pd_policy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c index 70258e73a5..cb1e3b743a 100644 --- a/board/zinger/usb_pd_policy.c +++ b/board/zinger/usb_pd_policy.c @@ -117,6 +117,9 @@ static timestamp_t fault_deadline; /* Voltage overshoot below the OVP threshold for discharging to avoid OVP */ #define DISCHARGE_OVERSHOOT_MV VBUS_MV(200) +/* Time to wait after last RX edge interrupt before allowing deep sleep */ +#define PD_RX_SLEEP_TIMEOUT (100*MSEC) + /* ----- output voltage discharging ----- */ /* expiration date of the discharge */ @@ -333,7 +336,7 @@ int pd_board_checks(void) #endif /* if it's been a while since last RX edge, then allow deep sleep */ - if (get_time_since_last_edge(0) > PD_RX_TRANSITION_WINDOW) + if (get_time_since_last_edge(0) > PD_RX_SLEEP_TIMEOUT) enable_sleep(SLEEP_MASK_USB_PD); vbus_volt = adc_read_channel(ADC_CH_V_SENSE); |