summaryrefslogtreecommitdiff
path: root/drivers/power/battery/bat_trats.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-07-10 20:40:47 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-07-10 20:40:47 +0200
commit630aacb0859c6e26b2b0311d8e245da5e5b8ac67 (patch)
treee9f6f6c28ae4a655f4519ca0db7bc882f8ee9abc /drivers/power/battery/bat_trats.c
parent87bd05d78f0f5765f3d3e1517c76794c82dab7cc (diff)
parent1ae76d438b602fe8be1f0ef8b8ce47c89d371047 (diff)
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers/power/battery/bat_trats.c')
-rw-r--r--drivers/power/battery/bat_trats.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c
index ca0d214659..97a9661150 100644
--- a/drivers/power/battery/bat_trats.c
+++ b/drivers/power/battery/bat_trats.c
@@ -41,18 +41,23 @@ static int power_battery_charge(struct pmic *bat)
for (k = 0; bat->chrg->chrg_bat_present(p_bat->chrg) &&
bat->chrg->chrg_type(p_bat->muic) &&
battery->state_of_chrg < 100; k++) {
- udelay(10000000);
- puts(".");
+ udelay(2000000);
+ if (!(k % 5))
+ puts(".");
bat->fg->fg_battery_update(p_bat->fg, bat);
- if (k == 100) {
+ if (k == 200) {
debug(" %d [V]", battery->voltage_uV);
puts("\n");
k = 0;
}
+ if (ctrlc()) {
+ printf("\nCharging disabled on request.\n");
+ goto exit;
+ }
}
-
+ exit:
bat->chrg->chrg_state(p_bat->chrg, CHARGER_DISABLE, 0);
return 0;