USB: msm_otg: Add 50 msec delay after changing scope from SYSTEM to DEVICE

When USB operate in host mode, it select SYSTEM scope.  PMIC charging
driver disable VBUS comparator upon SYSTEM scope request from USB.
scope is changed to DEVICE from SYSTEM for ID_GND-->ID_A transition.
USB request charging driver to draw current from VBUS.  Later when
charging driver receive VBUS valid interrupt, it tries to reset the
charging current as per AICL algorithm.

Add 50 msec delay after changing scope from SYSTEM to DEVICE.  This would
allow charger driver to observe VBUS valid interrupt before vbus_draw()
request from USB. Apply this delay only for ID_GND-->ID_A transition.

CRs-Fixed: 417564
Change-Id: Ic505468cddd650d9306568b377b324d523779040
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
1 file changed