usb: dwc2: fix unbalanced use of external vbus-supply
authorFabrice Gasnier <fabrice.gasnier@st.com>
Wed, 5 Sep 2018 11:40:05 +0000 (13:40 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 2 Oct 2018 07:37:40 +0000 (10:37 +0300)
commitcd7cd0e6cedfda8da6668a4af6748f96bbb6fed4
tree7913ab4b03936f6dc479426adf64a33ddb26fd50
parent5aa678c7fd5371769efde30763fb43a43a118cd0
usb: dwc2: fix unbalanced use of external vbus-supply

When using external vbus supply regulator, it should be enabled
synchronously with PWR bit in HPRT register. This also fixes
unbalanced use of this optional regulator (This can be reproduced
easily when unbinding the driver).

Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external
vbus supply")

Tested-by: Artur Petrosyan <arturp@synopsys.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c