mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
phy: rockchip-inno-usb2: don't cancel chg_work if otg in host mode
Because chg_work is used for charge detection, so if OTG works in Host mode, we don't need to initialize chg_work, and aslo we don't need to cancel it when phy exit. Change-Id: I19cbede5aeb4c1f7f8faa32f195fffb0fc71eca9 Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
This commit is contained in:
parent
ab01a407fc
commit
3caa76d5fd
|
|
@ -499,9 +499,10 @@ static int rockchip_usb2phy_exit(struct phy *phy)
|
|||
{
|
||||
struct rockchip_usb2phy_port *rport = phy_get_drvdata(phy);
|
||||
|
||||
if (rport->port_id == USB2PHY_PORT_OTG) {
|
||||
if (rport->port_id == USB2PHY_PORT_OTG &&
|
||||
rport->mode != USB_DR_MODE_HOST)
|
||||
cancel_delayed_work_sync(&rport->chg_work);
|
||||
} else if (rport->port_id == USB2PHY_PORT_HOST)
|
||||
else if (rport->port_id == USB2PHY_PORT_HOST)
|
||||
cancel_delayed_work_sync(&rport->sm_work);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user