Skip to content

Commit 459863b

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: mtu3: clear dual mode of u3port when disable device
[ Upstream commit f1e51e9 ] 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 <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1595834101-13094-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent afd847b commit 459863b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/usb/mtu3/mtu3_core.c

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

131-
if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG)
131+
if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG) {
132132
mtu3_clrbits(ibase, SSUSB_U2_CTRL(0), SSUSB_U2_PORT_OTG_SEL);
133+
if (mtu->is_u3_ip)
134+
mtu3_clrbits(ibase, SSUSB_U3_CTRL(0),
135+
SSUSB_U3_PORT_DUAL_MODE);
136+
}
133137

134138
mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
135139
}

0 commit comments

Comments
 (0)