USB: OTG: remove pm8921_set_usb_power_supply_type

This custom notifier is no longer required to determine
wether a wall charger is connected to the PM8921 charger
or not.

The pm8921-charger driver determines AC charging solely
dependent upon maximum input current from the charging
device.

CRs-Fixed: 339841
Change-Id: I564fa01c61286d013be6b263d038e87568a297f2
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
This commit is contained in:
David Keitel
2012-03-15 15:31:37 -07:00
committed by Stephen Boyd
parent 395698c2bc
commit afd4bd25bc

View File

@@ -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;