mfd: pm8xxx-irq: workaround for lost interrupt issue

An issue of missing interrupt was observed while resuming the device.
The genirq framework calls __enable_irq on all the interrupts during
resume.  This inturn calls unmask in the pm8xxx which caused the
pending status to drop for that interrupt. Later when the summary
handler is called, it does not see that interrupt pending and so its
handler is never called.

The pm8xxx irq module has a hardware bug where writing to the config
bits clears the pending status of the interrupt.

Fix it by avoiding unmasking the interrupt again if it is already
unmasked. This will prevent us from writing to the interrupt config
state, thus preventing dropping of the pending bit if set.

CRs-Fixed: 297320
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed