summaryrefslogtreecommitdiff
path: root/drivers/power/ab8500_btemp.c
diff options
context:
space:
mode:
authorJohan Bjornstedt <johan.bjornstedt@stericsson.com>2013-01-11 13:12:50 +0000
committerAnton Vorontsov <anton@enomsg.org>2013-01-15 17:10:17 -0800
commit3988a4df3499e604a3f2ae979372d27fc5664f77 (patch)
treeefe7b3265c2e4b9a6cdd51d268ce733ced2c3959 /drivers/power/ab8500_btemp.c
parentdefbfa9cf879c8e7dde6f7ee9aa95a010efa2e34 (diff)
ab8500_bm: Skip first CCEOC irq for instant current
When enabling the CCEOC irq we might get false interrupt from ab8500-driver due to the latched value will be saved and interpreted as an IRQ when enabled Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Johan Bjornstedt <johan.bjornstedt@stericsson.com> Signed-off-by: Henrik Solver <henrik.solver@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power/ab8500_btemp.c')
-rw-r--r--drivers/power/ab8500_btemp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
index e1d28039ce7b..4a570b6c9e47 100644
--- a/drivers/power/ab8500_btemp.c
+++ b/drivers/power/ab8500_btemp.c
@@ -374,13 +374,10 @@ static int ab8500_btemp_get_batctrl_res(struct ab8500_btemp *di)
return ret;
}
- /*
- * Since there is no interrupt when current measurement is done,
- * loop for over 250ms (250ms is one sample conversion time
- * with 32.768 Khz RTC clock). Note that a stop time must be set
- * since the ab8500_btemp_read_batctrl_voltage call can block and
- * take an unknown amount of time to complete.
- */
+ do {
+ msleep(20);
+ } while (!ab8500_fg_inst_curr_started(di->fg));
+
i = 0;
do {