mfd: pmic8058: fix for lost adc interrupt
An issue of missing interrupt was observed while resuming the device.
The msm_charger resume called adc conversion to get the battery
voltage. The adc conversion function enables the interrupt and
starts the conversion. Then pmic8058_resume gets called now which
re-enables the adc interrupt causing the pending bit to drop. With
the ADC EOC interrupt missed, the msm_charger does not receive a
completion event, causing a watchdog timeout.
The pmic8058 irq module has a hardware bug where writing to the config
bits clears the pending status of the interrupt.
Fix it using a sysdev where the pmic interrupts are switched before
any of the subdevices resume and use nonwakeup interrupts. Since
in sysdev resume we only enable non wakeup interrupts the status of
wakeup interrupts remains intact.
CRs-Fixed: 295261
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed