mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 14:01:54 +00:00
usb pd: Increasing delay for Rp time on CC lines
Some chargers don't respect the SRC.Open state within the 20ms allotted by the usb spec. The LiteOn Charger seems to notice after ~120ms bumping to 200ms so we cutoff Vbus for even ill-behaved chargers. We expect to brown out in the sleep. BRANCH=none TEST=LiteOn charge will disconnect now BUG=b:72510370 Change-Id: Ief0e999ed52f39420eed5f07432273e741a14c7e Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/886833 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
@@ -1829,9 +1829,9 @@ static void pd_partner_port_reset(int port)
|
||||
(RESET_FLAG_BROWNOUT | RESET_FLAG_POWER_ON))
|
||||
return;
|
||||
|
||||
/* Provide Rp for 100 msec. or until we no longer have VBUS. */
|
||||
/* Provide Rp for 200 msec. or until we no longer have VBUS. */
|
||||
tcpm_set_cc(port, TYPEC_CC_RP);
|
||||
timeout = get_time().val + 100 * MSEC;
|
||||
timeout = get_time().val + 200 * MSEC;
|
||||
|
||||
while (get_time().val < timeout && pd_is_vbus_present(port))
|
||||
msleep(10);
|
||||
|
||||
Reference in New Issue
Block a user