usb: dwc2: get optional vbus-supply regulator once
authorFabrice Gasnier <fabrice.gasnier@st.com>
Wed, 5 Sep 2018 11:40:02 +0000 (13:40 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 2 Oct 2018 07:37:01 +0000 (10:37 +0300)
commite0f681c2c11a25b76626cea77deb819a4754375d
tree17e7e145ac5ce7199b3d480c005dc43243256eab
parent3def4031b3e3fbb524cbd01555b057a6cef0d5e6
usb: dwc2: get optional vbus-supply regulator once

Move devm_regulator_get_optional() call to probe routine. This avoids
'vbus-supply' regulator to be requested lots of times, upon each call
to dwc2_vbus_supply_init(), e.g. like with runtime pm.

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
drivers/usb/dwc2/platform.c