Skip to content

Commit 09ed259

Browse files
liubiingregkh
authored andcommitted
usb: dwc3: turn off VBUS when leaving host mode
VBUS should be turned off when leaving the host mode. Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to turn off VBUS power. Fixes: 5f94adf ("usb: dwc3: core: refactor mode initialization to its own function") Cc: [email protected] Signed-off-by: Bin Liu <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 54c4c69 commit 09ed259

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/dwc3/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,9 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
12461246
/* do nothing */
12471247
break;
12481248
}
1249+
1250+
/* de-assert DRVVBUS for HOST and OTG mode */
1251+
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE);
12491252
}
12501253

12511254
static void dwc3_get_properties(struct dwc3 *dwc)

0 commit comments

Comments
 (0)