Android 4.4w Release 5
[FACTORY ROM] power: bcmpmu-fg: Avoid deadlock in work queues
When low voltage IRQ triggered a work was scheduled from the IRQ
handler to make a callback to the fuel gauge.
This callback tried to cancel and reschedule a periodic work.
When cancelling the work it was waiting for it to finish. It never
finished since the periodic work in some sub function tried to
read from ADC that was pending on IRQ to proceed. This IRQ callback
was put on the same work queue as the low voltage and now there
was a deadlock.
Solved it by releasing the IRQ callback by scheduling a new work
to do the task.
1 file changed