提交 09ed259f 编写于 作者: B Bin Liu 提交者: Greg Kroah-Hartman

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: 5f94adfe ("usb: dwc3: core: refactor mode initialization to its own function")
Cc: stable@vger.kernel.org
Signed-off-by: NBin Liu <b-liu@ti.com>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 54c4c69f
...@@ -1246,6 +1246,9 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) ...@@ -1246,6 +1246,9 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
/* do nothing */ /* do nothing */
break; break;
} }
/* de-assert DRVVBUS for HOST and OTG mode */
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE);
} }
static void dwc3_get_properties(struct dwc3 *dwc) static void dwc3_get_properties(struct dwc3 *dwc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册