MLK-12928-21 power: pf1550: fix charger interrupt never caught
authorRobin Gong <yibin.gong@nxp.com>
Mon, 27 Jun 2016 08:42:13 +0000 (16:42 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:52:24 +0000 (14:52 -0500)
commit6548aa9b7fb136814bc0ce8f453e901bd4b333b8
treed055360081f15d4377be7a2cc9dfad754c01206f
parentc59392d0535c2231b999d9420dc9d56ce3d62baa
MLK-12928-21 power: pf1550: fix charger interrupt never caught

Charger interrupt can't be caught anymore after plug in DC 5V in/out dozens of
times, that caused by VBUS_I or CHG_I pending interrupt not cleared in time. The root
cause is VBUS_I and CHG_I will be triggered in very narrow window, and VBUS_I/CHG_I
act as the sub-interrupt of charger and share the same interrupt handler. Thus if CHG_I
interrupt status is coming while VBUS_I handler is running, CHG_I interrupt status will
never be cleared, since interrupt has been disabled in ISR. The unclear CHG_I interrupt
status make pf1550 never trigger next interrupt again. So clear all charger interrupt
status in ISR to workaround instead of ack for every sub-intterrupt.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
drivers/mfd/pf1550.c
drivers/power/supply/pf1550_charger.c