HID: magicmouse: enable Magic Trackpad support
authorChase Douglas <chase.douglas@canonical.com>
Wed, 1 Sep 2010 01:56:23 +0000 (21:56 -0400)
committerRebecca Schultz Zavin <rebecca@android.com>
Fri, 3 Jun 2011 19:58:54 +0000 (12:58 -0700)
commitffac9011e9ff630d7c43bce7956ccf534e03b71e
treed37e8debbcfe4531311c1320778f9b35bacd8992
parent4690bf97bbf86bfdb79298ac927a9077b07d6048
HID: magicmouse: enable Magic Trackpad support

The trackpad speaks a similar, but different, protocol from the magic
mouse. However, only small code tweaks here and there are needed to make
basic multitouch work.

Extra logic is required for single-touch emulation of the touchpad. The
changes made here take the approach that only one finger may emulate the
single pointer when multiple fingers have touched the screen. Once that
finger is raised, all touches must be raised before any further single
touch events can be sent.

Sometimes the magic trackpad sends two distinct touch reports as one big
report. Simply splitting the packet in two and resending them through
magicmouse_raw_event ensures they are handled properly.

I also added myself to the copyright statement.

Change-Id: I3c83b5df807362052a551bf1a668244169085e88
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/hid/hid-magicmouse.c