diff options
author | Johan Bjornstedt <johan.bjornstedt@stericsson.com> | 2013-01-11 08:12:50 -0500 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-01-15 20:10:17 -0500 |
commit | 3988a4df3499e604a3f2ae979372d27fc5664f77 (patch) | |
tree | efe7b3265c2e4b9a6cdd51d268ce733ced2c3959 /drivers/power/ab8500_btemp.c | |
parent | defbfa9cf879c8e7dde6f7ee9aa95a010efa2e34 (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.c | 11 |
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) | |||
374 | return ret; | 374 | return ret; |
375 | } | 375 | } |
376 | 376 | ||
377 | /* | 377 | do { |
378 | * Since there is no interrupt when current measurement is done, | 378 | msleep(20); |
379 | * loop for over 250ms (250ms is one sample conversion time | 379 | } while (!ab8500_fg_inst_curr_started(di->fg)); |
380 | * with 32.768 Khz RTC clock). Note that a stop time must be set | 380 | |
381 | * since the ab8500_btemp_read_batctrl_voltage call can block and | ||
382 | * take an unknown amount of time to complete. | ||
383 | */ | ||
384 | i = 0; | 381 | i = 0; |
385 | 382 | ||
386 | do { | 383 | do { |