int pmic_vote_3p3_pwr_sel_switch(int boost) { int ret; ret = msm_pm_app_vote_usb_pwr_sel_switch(boost); return ret; }
int msm_pm_app_enable_usb_ldo(int enable) { /* for test */ #if 0 int ret; if (ldo_on == enable) return 0; ldo_on = enable; if (enable) { /* vote to turn ON Boost Vreg_5V */ ret = vreg_enable(boost_vreg); if (ret < 0) return ret; /* vote to switch it to VREG_5V source */ ret = msm_pm_app_vote_usb_pwr_sel_switch(1); if (ret < 0) { vreg_disable(boost_vreg); return ret; } ret = vreg_enable(usb_vreg); if (ret < 0) { msm_pm_app_vote_usb_pwr_sel_switch(0); vreg_disable(boost_vreg); return ret; } } else { ret = vreg_disable(usb_vreg); if (ret < 0) return ret; ret = vreg_disable(boost_vreg); if (ret < 0) return ret; /* vote to switch it to VBUS source */ ret = msm_pm_app_vote_usb_pwr_sel_switch(0); if (ret < 0) return ret; } #endif return 0; }