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>
This commit is contained in:

committed by
Anton Vorontsov

parent
defbfa9cf8
commit
3988a4df34
@@ -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 {
|
||||
|
Reference in New Issue
Block a user