aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChunfeng Yun2018-05-23 16:53:19 +0800
committerGreg Kroah-Hartman2018-05-24 18:09:37 +0200
commit4f9f032c256c3fc8ed23461e71d7acf3363a969f (patch)
treeda9156315443d56d5506b80023c513cdab62c98f /drivers
parent3d7678e2a02aa99de6c4ac090e1d8fcfbd023e34 (diff)
usb: mtu3: reset gadget when VBUS_FALL interrupt arises
When VBUS_FALL interrupt arises, it means U3 device is disconnected with host, so need reset status of gadget Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/mtu3/mtu3_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 279f9cd7bd6c..eecfd0671362 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -668,8 +668,10 @@ static irqreturn_t mtu3_u3_ltssm_isr(struct mtu3 *mtu)
if (ltssm & (HOT_RST_INTR | WARM_RST_INTR))
mtu3_gadget_reset(mtu);
- if (ltssm & VBUS_FALL_INTR)
+ if (ltssm & VBUS_FALL_INTR) {
mtu3_ss_func_set(mtu, false);
+ mtu3_gadget_reset(mtu);
+ }
if (ltssm & VBUS_RISE_INTR)
mtu3_ss_func_set(mtu, true);