@@ -330,12 +330,13 @@ static int abx500_chargalg_check_charger_enable(struct abx500_chargalg *di)
return di->usb_chg->ops.check_enable(di->usb_chg,
di->bat->bat_type[di->bat->batt_id].normal_vol_lvl,
di->bat->bat_type[di->bat->batt_id].normal_cur_lvl);
- } else if (di->chg_info.charger_type & AC_CHG) {
+ } else if ((di->chg_info.charger_type & AC_CHG) &&
+ !(di->ac_chg->external)) {
return di->ac_chg->ops.check_enable(di->ac_chg,
di->bat->bat_type[di->bat->batt_id].normal_vol_lvl,
di->bat->bat_type[di->bat->batt_id].normal_cur_lvl);
}
- return -ENXIO;
+ return 0;
}
/**