power: smb135x-charger: Perform I2C reads only after device resumes
The I2C bus driver while suspended rejects all the I2C transactions.
In a scenario where the wakeup is from an SMB irq, the smb driver
fails to perform i2c reads from its stat interrupt handler which
is invoked while i2c bus is suspended. The SMB chip continuously
fires IRQs until the irq status registers are read leading to
interrupt storm.
To avoid this storm of interrupts, wait in the interrupt handler until
i2c bus resumes. The resume_noirq and resume callback are fair indications
of i2c bus resume completion. Use them in a flag to wait in the interrupt
handler.
Change-Id: I6bbc71a6d4a611556b8365f2b9cce077b8bde911
Signed-off-by:
Anirudh Ghayal <aghayal@codeaurora.org>
Loading
Please register or sign in to comment