summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-07-14 10:02:19 +0800
committerLi Jun <B47624@freescale.com>2014-07-14 10:02:19 +0800
commite68e89999203310d91bf13e12e77df9c78537260 (patch)
tree326b1a333d48b180dc983c90ea885c58b2ec0653 /drivers
parentac0cacff3238e96e7c5c45fd55cd674fc5b1c8cc (diff)
ENGR00322594 usb: chipidea: udc: disconnect gadget for udc restore in non-otg mode
This patch adds condition check for gadget disconnect when restore udc, if in otg fsm mode, let otg fsm handle this by otg state machine. Signed-off-by: Li Jun <b47624@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/chipidea/udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index d84aefde1a79..473d83453b67 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1952,7 +1952,7 @@ static void udc_suspend_for_power_lost(struct ci_hdrc *ci)
static void udc_resume_from_power_lost(struct ci_hdrc *ci)
{
/* Force disconnect if power lost with vbus on */
- if (ci->vbus_active)
+ if (!ci_otg_is_fsm_mode(ci) && ci->vbus_active)
usb_gadget_vbus_disconnect(&ci->gadget);
if (ci->is_otg)