phy: rockchip: inno-usb2: power on phy if linestate is SE1
Some special devices connected to host port, the linestate maybe SE1 (DP/DM both in High level). The below devices are the known special devices Wireless HID: VID = 0xa604, PID = 0x0715 RK3308BS ADB: VID = 0x2207, PID = 0x0006 In order to support these special devices, this patch handle the linestate SE1 as device connected state, and power on the phy if it has already suspended. Change-Id: I55fe83150c18d6c2629fbc857790ef04cdb68da5 Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
@ -59,6 +59,7 @@ enum rockchip_usb2phy_host_state {
|
||||
PHY_STATE_DISCONNECT = 1,
|
||||
PHY_STATE_CONNECT = 2,
|
||||
PHY_STATE_FS_LS_ONLINE = 4,
|
||||
PHY_STATE_SE1 = 6,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1484,6 +1485,15 @@ static void rockchip_usb2phy_sm_work(struct work_struct *work)
|
||||
dev_dbg(&rport->phy->dev, "FS/LS online\n");
|
||||
}
|
||||
break;
|
||||
case PHY_STATE_SE1:
|
||||
if (rport->suspended) {
|
||||
dev_dbg(&rport->phy->dev, "linestate is SE1, power on phy\n");
|
||||
mutex_unlock(&rport->mutex);
|
||||
rockchip_usb2phy_power_on(rport->phy);
|
||||
mutex_lock(&rport->mutex);
|
||||
rport->suspended = false;
|
||||
}
|
||||
break;
|
||||
case PHY_STATE_DISCONNECT:
|
||||
if (!rport->suspended) {
|
||||
dev_dbg(&rport->phy->dev, "Disconnected\n");
|
||||
|
||||
Reference in New Issue
Block a user