USB: dwc3_otg: Defer VBUS regulator voting from probe to start_host

VBUS regulator is required only in HOST mode to supply VBUS. Hence,
it is not best idea to bail out from probe if VBUS regulator_get
fails. Additionally, the regulator_get may fail with -517 or
EPROBE_DEFER. In this case driver should ideally return EPROBE_DEFER
which allows kernel to call driver's probe again later. But, this
approach can not be used with OTG driver as there are other
dependent device drivers e.g. android composite gadget and
dwc3_msm which expects OTG to be available. Also, deferring probe
results in userspace bootup scripts to fail which may be required
to configure gadget driver parameters and it would be difficult to
reconfigure these parameters later.
Hence, moving vbus regulator get from driver probe to start_host
to addresses these issues.

Change-Id: I2e1ab1a86d9c1389bca09d7dd9574ef481056ed6
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
1 file changed