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

Skip to content
Commit dd1a207e authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Fix VDM and misc timing issues



Decrease the wait time from 5ms to 2ms when preparing a VDM
response to ensure that it gets sent out timely within
tSenderResponse (15ms). To avoid possible collision with an
incoming packet, check that there has not been any queued Rx
message just prior to sending a VDM. Also check the result of the
transmit and simply try again later if -EBUSY is returned.

While at it, fix a couple other miscellaneous timing issues.
Setting PD_ACTIVE=1 has considerable delay due to the charger's
voting mechanism, so move setting it to after starting the
SenderResponse timer when sending the Source Capabilities, and
similarly after sending a Request as a sink, in order to make
sure response timing is met. For source hard reset, increase the
tSrcRecover delay slightly from the spec minimum to account for
additional VBUS rise/fall delays before sending PS_RDY. Finally,
add a delay for VCONN_SWAP before sending PS_RDY for similar reason.

Change-Id: I5760fadb66cad6faf02e95a1e1bb975289ef8e9f
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent d854b01d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment