USB: OTG: Update vbus_is_on variable for pdata based vbus power routine
vbus power routine can be different based on platform. If vbus power sequence is provided using platform data(pdata), disconnect of OTG cable doesn't turn off the VBUS related regulators and required other interfaces. This issue is seen as vbus_is_on variable remains always zero for pdata based vbus routine, and msm_hsusb_vbus_power(motg, 0) doesn't invoke the required vbus power routine. Hence update the vbus_is_on variable based on return value of pdata based vbus routine. With this change, it is mandatory that pdata based vbus routine should return the success/failure result. CRs-Fixed: 332434 Change-Id: I4c7ce48057f65227b09aac788d0ad24d0f30ed7e Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
ee63040039
commit
ec21fb1668
@@ -1034,7 +1034,9 @@ static void msm_hsusb_vbus_power(struct msm_otg *motg, bool on)
|
||||
return;
|
||||
|
||||
if (motg->pdata->vbus_power) {
|
||||
motg->pdata->vbus_power(on);
|
||||
ret = motg->pdata->vbus_power(on);
|
||||
if (!ret)
|
||||
vbus_is_on = on;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user