mfd: cpcap-3mm5: Fix for missing key event on resume
authorGreg Meiste <w30289@motorola.com>
Mon, 29 Nov 2010 21:52:46 +0000 (15:52 -0600)
committerColin Cross <ccross@android.com>
Wed, 1 Dec 2010 00:25:27 +0000 (16:25 -0800)
commite9ba5a3542c60d8ace62e66415bc06f89a9c1c9a
treedb0bf8475226c68a3c41a787a932649eefce22ce
parent6ce48b8fc42c1606b092ec7c39ce13327872d42f
mfd: cpcap-3mm5: Fix for missing key event on resume

The key_handler was checking the sense bits to see whether a press
or release occurred.  The problem with this is it takes so long to
resume from LP0/LP1, that the key state could have changed again
before the handler has even ran.  The driver would see the key was
currently released, which was the same state it last reported, and
not send a new event.

This patch changes the handler so it does not check the sense bits.
It simply sends a press when the MB2 interrupt occurs and a release
when the MACRO_5 interrupt occurs.

This fixes the kernel portion of bug 3225781.

Change-Id: I38a89417a0053315c93dc6c696a34a8974252d2a
Signed-off-by: Greg Meiste <w30289@motorola.com>
drivers/mfd/cpcap-3mm5.c