summaryrefslogtreecommitdiff
path: root/test/usb_typec_ctvpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/usb_typec_ctvpd.c')
-rw-r--r--test/usb_typec_ctvpd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/usb_typec_ctvpd.c b/test/usb_typec_ctvpd.c
index 61fc64f9b9..b16ac37b25 100644
--- a/test/usb_typec_ctvpd.c
+++ b/test/usb_typec_ctvpd.c
@@ -78,7 +78,7 @@ uint64_t wait_for_state_change(int port, uint64_t timeout)
start = get_time().val;
while (get_state_tc(port) == state && get_time().val < wait) {
task_wake(PD_PORT_TO_TASK_ID(port));
- task_wait_event(5 * MSEC);
+ task_wait_event(1 * MSEC);
}
return get_time().val - start;
@@ -464,6 +464,10 @@ static int test_vpd_host_src_detection_vbus(void)
TEST_ASSERT(get_state_tc(port) == TC_UNATTACHED_SNK);
+ wait_for_state_change(port, 10 * MSEC);
+
+ TEST_ASSERT(get_state_tc(port) == TC_ATTACH_WAIT_SNK);
+
return EC_SUCCESS;
}