summaryrefslogtreecommitdiff
path: root/scripts/build-all.py
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2016-11-16 14:28:10 -0800
committerJack Pham <jackp@codeaurora.org>2016-11-23 15:03:14 -0800
commitd854b01d5525c3cc16149ab1b1dac296e77a5a65 (patch)
treea82eb064c6d0fcc69df13bc6cfab395ef8695f1c /scripts/build-all.py
parent019cc2089be324bf435a6cebd75888ada22ee4c5 (diff)
usb: pd: Avoid spurious state machine work on CC change
If an unexpected or delayed Type-C mode change notification arrives from the charger driver, it could falsely kick the state machine and could cause it to prematurely hard reset since it preempted an expected message. This is particularly true for the PR Swap operation in which the timing of PS_RDY and resulting power negotiation is disrupted by the CC change notification which is catching up. The previous way of handling this by using the pd->in_pr_swap flag to mask the typec_mode changes is quite fragile due to the uncertainty of when said flag should be cleared. Hence, demote the use of the in_pr_swap flag for only ignoring the expected disconnect the happens in between the role change. Then, for typec_mode changes, determine if current_pr is changed or not to decide whether to kick the state machine. Finally, since disconnect now is signaled by pd->current_pr==PR_NONE, we'll need to keep track of whether VBUS had been enabled with a separate flag rather than relying on pd->current_pr==PR_SRC. Change-Id: I66be40091b75726d25c7be4478f1248a6af9ca3c Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'scripts/build-all.py')
0 files changed, 0 insertions, 0 deletions