summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorRupesh Kumar <rupesh.kumar@stericsson.com>2012-06-26 14:27:15 +0530
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2012-09-25 09:40:27 -0600
commit94daf8149e076a8708342d2e2dcd18c27eb0b766 (patch)
treeb0a6503f7fc5fe11855af95bbb961327008c7f9f /drivers/power
parent1c981eea2c599ed51bd19350a8b992e0ffe27046 (diff)
power: ab8500 : quick re-attach for ext charger
Quick re-attach charging behaviour is not required for external ac charger. Internal AC/USB Charger removal detection problem is due to a bug in AB8500 ASICs. Signed-off-by: Rupesh Kumar <rupesh.kumar@stericsson.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Hakan BERG <hakan.berg@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/abx500_chargalg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c
index 180deab236e3..ce58f2044912 100644
--- a/drivers/power/abx500_chargalg.c
+++ b/drivers/power/abx500_chargalg.c
@@ -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;
}
/**