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

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

usb: dwc3-msm: Simplify restart_usb_host_mode() callback



Convert restart_usb_host_mode() into a generic blocking_sync()
callback which simply ensures that any pending role switches are
fully flushed before proceeding with the next extcon_set_state()
call. Move the responsibility of stopping/restarting host mode
with the speed to the PD policy engine instead.

This fixes a couple of possible race scenarios:
1) stopping host mode needs to be fully completed before allowing
   DisplayPort to initialize as it may require exclusive use of
   the PHY.

2) data role swap followed by entering DisplayPort alt mode in
   which it determines it needs 4-lane configuration. The
   back-to-back start peripheral, stop peripheral and start
   host may overlap if they are not serialized.

Change-Id: Ic29b74ae3e22f69f67e73aba59d211b81eb70de0
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 0c075d52
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