aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse/appletouch.c
AgeCommit message (Collapse)Author
2009-06-03Input: appletouch - improve finger detectionJeremy Huddleston
The appletouch driver is prone to reporting multiple fingers when only one is pressing. The appletouch driver queries an array of pressure sensors and counts local maxima in pressure to determine the number of fingers. It just does this on the raw values, so a data stream like: 0 100 250 300 299 300 250 100 0 actually registers as 2 fingers. This patch updates the logic to ignore small dips in pressure that are less than the threshold. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: appletouch - fix DMA to/from stack bufferBob Copeland
CONFIG_DMA_API_DEBUG spotted an instance of appletouch using an array on the stack as a DMA buffer for certain hardware. Change it to use a kmalloc()ed buffer instead. Signed-off-by: Bob Copeland <me@bobcopeland.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-10-29Input: appletouch - driver refactoringStelian Pop
The appletouch driver has grown up from supporting only a couple of touchpads into supporting many touchpads, which can have different number of sensors, different aspect ratios etc. This patch cleans up the current driver code and makes it easy to support the features of each different touchpad. As a side effect, this patch also modifies the 'Y' multiplication factor of the 'geyser3' and 'geyser4' touchpads (found on Core Duo and Core2 Duo MacBook and MacBook Pro laptops) in order to make the touchpad output match the aspect ratio of the touchpad (Y factor changed from 43 to 64). [dtor@mail.ru: make atp_info constant] Signed-off-by: Stelian Pop <stelian@popies.net> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-08-08Input: appletouch - handle geyser 3/4 status bitsSven Anders
Implement support for status bits on Geyser 3/4. Signed-off-by: Sven Anders <anders@anduras.de> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-08-08Input: appletouch - prepare for geyser 3/4 handlingSven Anders
Split complete function into separate functions for GEYSER1/2 and GEYSER 3/4. Signed-off-by: Sven Anders <anders@anduras.de> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-17Merge branch 'for-linus' into nextDmitry Torokhov
Conflicts: drivers/input/mouse/appletouch.c
2008-06-17Input: appletouch - implement reset-resume logicOliver Neukum
On some boxes the touchpad needs to be reinitialized after resume to make it function again. This fixes bugzilla #10825. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16Input: appletouch - simplify touchpad type detectionSven Anders
This patch simplifies type detection and removes unnecessary code. Signed-off-by: Sven Anders <anders@anduras.de> [jberg: don't typedef, checkpatch clean, remove useless comments, ...] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16Input: appletouch - miscellaneous code cleanupsJohannes Berg
This patch does some code cleanups in appletouch: * useless comment removal * make almost checkpatch clean * make sparse clean Signed-off-by: Sven Anders <anders@anduras.de> [jberg: most of the changes including removing much of the original patch] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16Input: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-02Input: appletouch - add product IDs for the 4th generation MacBooksTobias Mueller
Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-11-01Input: appletouch - idle reset logic broke older FountainsDmitry Torokhov
Fountains do not support change mode request and therefore should be excluded from idle reset attempts. Also: - do not re-submit URB when we decide that touchpad needs to be reinicialized - do not repeat size detection when reinitializing the touchpad - Add missing KERN_* prefixes to messages Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Johannes Berg <johannes@sipsolutions.net>
2007-10-22Input: appletouch - apply idle reset logic to all touchpadsAnton Ekblad
Not only Geyser 3 but also Geyser 1 need to be reset after they become idle to stop them from needlessly waking up the kernel. Do idle reset on all touchpads, regardless of their version - if we see 10 empty packets the touchpad needs to be reset; good touchpads should not send empty packets anyway. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-10-13Input: appletouch - another fix for idle reset logicSoeren Sonnenburg
Make sure we reset idlecount when we get a good (non-empty) packet. Signed-off-by: Soeren Sonnenburg <kernel@nn7.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-09-25Input: appletouch - fix idle reset logicThomas Rohwer
Idle count should only be incremented when touchpad button is not pressed, otherwise reset may happen at a wrong time and touchpad will never report button release event. Signed-off-by: Thomas Rohwer <trohwer@tng.de> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-20Input: appletouch - improve powersaving for Geyser3 devicesSoeren Sonnenburg
The appletouch geyser3 devices found in the Intel Macs (and possibly some later PPC ones?) send a constant stream of packets after the first touch. This results in the kernel waking up around once every couple of milliseconds to process them, making it almost impossible to spend any significant amount of time in C3 state on a dynamic HZ kernel. Sending the mode initialization code makes the device shut up until it's touched again. This patch does so after receiving 10 packets with no interesting content. Signed-off-by: Soeren Sonnenburg <kernel@nn7.de> Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-08Input: move USB mice under drivers/input/mouseDmitry Torokhov
This will allow concentrating all input devices in one place in {menu|x|q}config. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>