From d98a1df78740eedcc4d3d4c8d44b39b73f81df2d Mon Sep 17 00:00:00 2001 From: Badhri Jagan Sridharan Date: Mon, 7 Jun 2021 17:58:01 -0700 Subject: [PATCH] ANDROID: usb: typec: tcpm: Fixup the wait time for SNK_DISCOVERY f694171a837e4 ("ANDROID: usb: typec: tcpm: vendor hook for timer adjustments") incorrectly passes the hard coded value of 500ms instead of passing the value of the timer obtained from vendor hook. This change fixes that. Bug: 184308605 Bug: 185515554 Bug: 190442133 Signed-off-by: Badhri Jagan Sridharan Change-Id: I678110146f460875978baa0a63010392ce9d939a --- drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 91bf062666a1..59cec4a4840f 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -4209,7 +4209,7 @@ static void run_state_machine(struct tcpm_port *port) timer_val_msecs = 0; trace_android_vh_typec_tcpm_get_timer(tcpm_states[SNK_STARTUP], SINK_DISCOVERY_BC12, &timer_val_msecs); - tcpm_set_state(port, SNK_DISCOVERY, 500); + tcpm_set_state(port, SNK_DISCOVERY, timer_val_msecs); break; case SNK_DISCOVERY: if (port->vbus_present) {