Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fa1e1c9 authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Increase number of SRC_CAP attempts before starting host



It is observed that some PD-capable sink devices have a
longer start-up delay before responding to the Source
Capabilities message with a Request. Since it is PD capable
we'd like to wait until after entering PE_SRC_Ready and VDM
Discovery to start USB host mode. Accommodate these devices by
increasing the number of failed attempts of sending the message
from 5 to 10 before treating it as a non-PD device and starting
host mode.

Change-Id: Ia555699e78729b75dc118cbb929f7c4c4f2d1279
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent d1a0cb9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1571,7 +1571,7 @@ static void usbpd_sm(struct work_struct *w)
		if (ret) {
			pd->caps_count++;

			if (pd->caps_count == 5 && pd->current_dr == DR_DFP) {
			if (pd->caps_count == 10 && pd->current_dr == DR_DFP) {
				/* Likely not PD-capable, start host now */
				start_usb_host(pd, true);
			} else if (pd->caps_count >= PD_CAPS_COUNT) {