usb: pd: policy_engine: Add support to handle floating charger

There is a possibility of PMI detecting SDP as a floating charger
when connected to a PC. Workaround this issue by starting peripheral
stack for floating charger as well. Stop peripheral stack after 10 sec
in absence of USB device enumeration.

Change-Id: I6effee71affbe0baeb28c54ce799ade79ec4b42a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
Hemant Kumar 2017-07-13 12:08:49 -07:00
parent ba4eab879d
commit 9ffb0179b0

View file

@ -920,6 +920,7 @@ static void usbpd_set_state(struct usbpd *pd, enum usbpd_state next_state)
if (pd->psy_type == POWER_SUPPLY_TYPE_USB ||
pd->psy_type == POWER_SUPPLY_TYPE_USB_CDP ||
pd->psy_type == POWER_SUPPLY_TYPE_USB_FLOAT ||
usb_compliance_mode)
start_usb_peripheral(pd);
}