2020-07-27 07:17:37

by Chunfeng Yun

[permalink] [raw]
Subject: [PATCH 10/11] 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]>
---
drivers/usb/mtu3/mtu3_core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index c875b22..a9c5c32 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -131,8 +131,12 @@ static void mtu3_device_disable(struct mtu3 *mtu)
mtu3_setbits(ibase, SSUSB_U2_CTRL(0),
SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN);

- if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG)
+ if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG) {
mtu3_clrbits(ibase, SSUSB_U2_CTRL(0), SSUSB_U2_PORT_OTG_SEL);
+ if (mtu->is_u3_ip)
+ mtu3_clrbits(ibase, SSUSB_U3_CTRL(0),
+ SSUSB_U3_PORT_DUAL_MODE);
+ }

mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
}
--
1.9.1


2020-07-27 08:10:20

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH 10/11] usb: mtu3: clear dual mode of u3port when disable device

Hello!

On 27.07.2020 10:14, Chunfeng Yun wrote:

> If not clear u3port's dual mode when disable device, the IP

If we don't clear ... when disabling ...?

> will fail to enter sleep mode when suspend.
>
> Signed-off-by: Chunfeng Yun <[email protected]>
[...]

MBR, Sergei

2020-07-28 06:07:44

by Chunfeng Yun

[permalink] [raw]
Subject: Re: [PATCH 10/11] usb: mtu3: clear dual mode of u3port when disable device

On Mon, 2020-07-27 at 11:07 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 27.07.2020 10:14, Chunfeng Yun wrote:
>
> > If not clear u3port's dual mode when disable device, the IP
>
> If we don't clear ... when disabling ...?
>
> > will fail to enter sleep mode when suspend.
Ok, thanks a lot

> >
> > Signed-off-by: Chunfeng Yun <[email protected]>
> [...]
>
> MBR, Sergei