diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index 1507cde1284..1e6a345aadd 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c @@ -1016,33 +1016,6 @@ skip_phy_resume: } #endif -static int msm_otg_notify_chg_type(struct msm_otg *motg) -{ - static int charger_type; - /* - * TODO - * Unify OTG driver charger types and power supply charger types - */ - if (charger_type == motg->chg_type) - return 0; - - if (motg->chg_type == USB_SDP_CHARGER) - charger_type = POWER_SUPPLY_TYPE_USB; - else if (motg->chg_type == USB_CDP_CHARGER) - charger_type = POWER_SUPPLY_TYPE_USB_CDP; - else if (motg->chg_type == USB_DCP_CHARGER) - charger_type = POWER_SUPPLY_TYPE_USB_DCP; - else if ((motg->chg_type == USB_ACA_DOCK_CHARGER || - motg->chg_type == USB_ACA_A_CHARGER || - motg->chg_type == USB_ACA_B_CHARGER || - motg->chg_type == USB_ACA_C_CHARGER)) - charger_type = POWER_SUPPLY_TYPE_USB_ACA; - else - charger_type = POWER_SUPPLY_TYPE_BATTERY; - - return pm8921_set_usb_power_supply_type(charger_type); -} - static int msm_otg_notify_power_supply(struct msm_otg *motg, unsigned mA) { struct power_supply *psy; @@ -1086,11 +1059,6 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) mA > IDEV_ACA_CHG_LIMIT) mA = IDEV_ACA_CHG_LIMIT; - if (msm_otg_notify_chg_type(motg)) - dev_err(motg->otg.dev, - "Failed notifying %d charger type to PMIC\n", - motg->chg_type); - if (motg->cur_power == mA) return;