Skip to content

Commit f1e51e9

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: mtu3: clear dual mode of u3port when disable device
If not clear u3port's dual mode when disable device, the IP will fail to enter sleep mode when suspend. Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5440237 commit f1e51e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/usb/mtu3/mtu3_core.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,12 @@ static void mtu3_device_disable(struct mtu3 *mtu)
131131
mtu3_setbits(ibase, SSUSB_U2_CTRL(0),
132132
SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN);
133133

134-
if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG)
134+
if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG) {
135135
mtu3_clrbits(ibase, SSUSB_U2_CTRL(0), SSUSB_U2_PORT_OTG_SEL);
136+
if (mtu->is_u3_ip)
137+
mtu3_clrbits(ibase, SSUSB_U3_CTRL(0),
138+
SSUSB_U3_PORT_DUAL_MODE);
139+
}
136140

137141
mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
138142
}

0 commit comments

Comments
 (0)