Skip to content

Commit f6fac8b

Browse files
Meng Dongyangrkhuangtao
authored andcommitted
phy: rockchip: rockchip-inno-usb2: flush otg work when exit
The controller will be reinit when suspend and resume in device mode if not connect to PC. And the U2PHY must be keep in power on state during the init process. But The 'otg_sm_work' may be schedule immediately and power off the U2PHY if system suspend and resume between the delay time of schedule 'otg_sm_work', so it will result in the error when init controller as below: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001 So flush the otg work in exit function to finish power control of U2PHY. Change-Id: I79c4b6a877196abd2f2201b2f984c9ea22e48fec Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
1 parent 6c93dac commit f6fac8b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/phy/rockchip/phy-rockchip-inno-usb2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static int rockchip_usb2phy_exit(struct phy *phy)
741741

742742
if (rport->port_id == USB2PHY_PORT_HOST)
743743
cancel_delayed_work_sync(&rport->sm_work);
744+
else if (rport->port_id == USB2PHY_PORT_OTG)
745+
flush_delayed_work(&rport->otg_sm_work);
744746

745747
return 0;
746748
}

0 commit comments

Comments
 (0)