Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9b80995e authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-bms: fix unbalanced IRQ enables



After a previous patch, the BMS driver's sw_cc_thr and ocv_thr IRQs were
being enabled twice, causing a warning in the kernel log. This happened
because the bms_irq_disable function was being called after the BMS
driver found the IRQ number but before it was requested.

Disabling the IRQs from the bms driver before they were requested
resulted in a situation where the BMS thinks that the IRQs are disabled
but the request function had reset the IRQs so that they were enabled
once again.

Fix this by adding a ready bit to the bms_irq struct and setting it
after the devm_request_irq call. If an IRQ is not ready, then do not
enable or disable it.

Change-Id: I52dfbe6c21b8c5cadf60874beab0fe1a4ec7a63f
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent ce80330c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment