phy: rockchip-inno-usb2: delay suspending phy if plug out device
authorWilliam Wu <william.wu@rock-chips.com>
Thu, 20 Jul 2017 07:02:02 +0000 (15:02 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 21 Jul 2017 03:16:24 +0000 (11:16 +0800)
commit4f519feed0d9e268447981b3699ab02d9d454256
tree7a27cfe9dcb9d3f587c31e1484d0a1fef61f8d48
parent0d01d2234a7c0e9c2db4dedbe09f9d9e473975f8
phy: rockchip-inno-usb2: delay suspending phy if plug out device

The otg_sm_work will suspend the usb2 phy immediately
if it detects disconnection from host. However, the usb2
controller(e.g. DWC2) may need to reinit registers and
reset usb core after usb disconnect, and it needs to
keep the usb2 phy stay in power on state to get utmi clk
for these usb controller operation. We don't have a good
synchronization mechanism to operate usb2 phy between
usb2 phy driver and usb2 controller driver, so we delay
4s to suspend phy if detect otg device disconnect from
host, this can make sure that usb2 controller completes
reinitialization before suspend usb2 phy.

Change-Id: I79288b8c7b141bb16e6d96d80cfee75f7558d2c0
Signed-off-by: William Wu <william.wu@rock-chips.com>
drivers/phy/phy-rockchip-inno-usb2.c