mfd: cpcap-3mm5: Improve support for Apple 3 button headsets
authorGreg Meiste <w30289@motorola.com>
Tue, 4 Jan 2011 17:42:42 +0000 (11:42 -0600)
committerRebecca Schultz Zavin <rebecca@android.com>
Thu, 6 Jan 2011 23:13:39 +0000 (15:13 -0800)
commit24b11efa775e6d807d8b84a3a04d74163fd83573
treeeba0afbcda5dd4b1604972418d1c94d0f149a593
parent02cd7ffa55db4bf6cb6fc5236e92df20fe16e51e
mfd: cpcap-3mm5: Improve support for Apple 3 button headsets

Previously when an Apple 3 button headset was inserted, the driver would
report the MEDIA key as always pressed.  When the volume keys were pressed,
a release was reported, and when the key was actually released, a press
was reported again.

This patch improves Apple headset support by sending the MEDIA key
press and releases correctly based on whether the volume key is actually
pressed or released.  The 3 buttons are still treated the same due to
hardware limitations.

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