summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/appletouch.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: input: appletouch: fix up compiler warningGreg Kroah-Hartman2012-05-041-1/+0
| | | | | | | | | My last patch fixing up the dev_* messages caused a compiler warning accidentally for an unused variable. Fix this up, as it was my fault. Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: input: appletouch.c: fix up dev_* messagesGreg Kroah-Hartman2012-05-041-12/+15
| | | | | | | | | | Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Alessandro Rubini <rubini@ipvvis.unipv.it> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: appletouch.c: remove dbg() usageGreg Kroah-Hartman2012-05-011-7/+11
| | | | | | | | | | dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Alessandro Rubini <rubini@ipvvis.unipv.it> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: input: appletouch.c: fix up dev_err() usageGreg Kroah-Hartman2012-05-011-13/+11
| | | | | | | | | We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Alessandro Rubini <rubini@ipvvis.unipv.it> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: appletouch.c: remove err() usageGreg Kroah-Hartman2012-04-251-11/+14
| | | | | | | | | | err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Alessandro Rubini <rubini@ipvvis.unipv.it> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: convert drivers/input/* to use module_usb_driver()Greg Kroah-Hartman2011-11-181-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/input/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Henk Vergonet <Henk.Vergonet@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Henrik Rydberg <rydberg@euromail.se> Cc: "Magnus Hörlin" <magnus@alefors.se> Cc: Chris Moeller <kode54@gmail.c> Cc: Christoph Fritz <chf.fritz@googlemail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Edwin van Vliet <edwin@cheatah.nl> Cc: Ping Cheng <pingc@wacom.com> Cc: Eduard Hasenleithner <eduard@hasenleithner.at> Cc: Alexander Strakh <strakh@ispras.ru> Cc: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Input: appletouch - remove extra KERN_DEBUG use from dprintkJoe Perches2010-10-311-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Revert "Input: appletouch - fix integer overflow issue"Benjamin Herrenschmidt2010-08-091-3/+3
| | | | | | | | | | | | This reverts commit 04b4b88cca0ebe3813b4b6f014fb6a0db380b137. While the original problem only caused a slight disturbance on the edge of the touchpad, the commit above to "fix" it completely breaks operation on some other models such as mine. We'll sort this out separately, revert the patch for now. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack2010-05-201-6/+6
| | | | | | | | | | | | | | | | | | For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Input: appletouch - fix integer overflow issueVadim Zaliva2010-03-111-3/+3
| | | | | | | | | | | | | | | | | When reading data from Geyser 2 touchpads used on post Oct 2005 Apple PowerBooks the driver was casting X and Y coordinates values to 'signed char'. Testing on one of such PowerBooks I have noticed that touchpad always generates positive values, but some of them are greater that 127, and thus, when cast to 'signed char' being interpreted as a negative. Such bigger values have been observed infrequently, closer to the edges of a touchpad, so the problem was not very visible. Nevertheless, the patch would potentially improve touchpad driver accuracy. Signed-off-by: Vadim Zaliva <lord@crocodile.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: appletouch - improve finger detectionJeremy Huddleston2009-06-031-1/+1
| | | | | | | | | | | | | | | | | 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>
* Input: appletouch - fix DMA to/from stack bufferBob Copeland2009-04-281-6/+18
| | | | | | | | | | 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>
* Input: appletouch - driver refactoringStelian Pop2008-10-291-138/+136
| | | | | | | | | | | | | | | | | | | | 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>
* Input: appletouch - handle geyser 3/4 status bitsSven Anders2008-08-081-18/+35
| | | | | | | | 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>
* Input: appletouch - prepare for geyser 3/4 handlingSven Anders2008-08-081-69/+197
| | | | | | | | 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>
* Merge branch 'for-linus' into nextDmitry Torokhov2008-06-171-8/+41
|\ | | | | | | | | | | Conflicts: drivers/input/mouse/appletouch.c
| * Input: appletouch - implement reset-resume logicOliver Neukum2008-06-171-8/+41
| | | | | | | | | | | | | | | | 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>
* | Input: appletouch - simplify touchpad type detectionSven Anders2008-05-161-107/+57
| | | | | | | | | | | | | | | | | | 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>
* | Input: appletouch - miscellaneous code cleanupsJohannes Berg2008-05-161-73/+100
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Input: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-05-161-4/+4
|/ | | | | | | | __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>
* Input: appletouch - add product IDs for the 4th generation MacBooksTobias Mueller2008-04-021-1/+12
| | | | | | Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: appletouch - idle reset logic broke older FountainsDmitry Torokhov2007-11-011-48/+77
| | | | | | | | | | | | | | 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>
* Input: appletouch - apply idle reset logic to all touchpadsAnton Ekblad2007-10-221-14/+11
| | | | | | | | | | 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>
* Input: appletouch - another fix for idle reset logicSoeren Sonnenburg2007-10-131-5/+10
| | | | | | | 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>
* Input: appletouch - fix idle reset logicThomas Rohwer2007-09-251-2/+4
| | | | | | | | | | 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>
* Input: appletouch - improve powersaving for Geyser3 devicesSoeren Sonnenburg2007-07-201-37/+74
| | | | | | | | | | | | | | | 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>
* Input: move USB mice under drivers/input/mouseDmitry Torokhov2007-05-081-0/+706
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>
OpenPOWER on IntegriCloud