aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-08-23Input: synaptics - decode AGM packet typesDaniel Kurtz2-7/+43
A Synaptics image sensor tracks 5 fingers, but can only report 2. The algorithm for choosing which 2 fingers to report and in which packet: Touchpad maintains 5 slots, numbered 0 to 4 Initially all slots are empty As new fingers are detected, assign them to the lowest available slots The touchpad always reports: SGM: lowest numbered non-empty slot AGM: highest numbered non-empty slot, if there is one In addition, these touchpads have a special AGM packet type which reports the number of fingers currently being tracked, and which finger is in each of the two slots. Unfortunately, these "TYPE=2" packets are only used when more than 3 fingers are being tracked. When less than 4 fingers are present, the 'w' value must be used to track how many fingers are present, and knowing which fingers are being reported is much more difficult, if not impossible. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23Input: synaptics - add image sensor supportDaniel Kurtz2-17/+110
Synaptics makes (at least) two kinds of touchpad sensors: * Older pads use a profile sensor that could only infer the location of individual fingers based on the projection of their profiles onto row and column sensors. * Newer pads use an image sensor that can track true finger position using a two-dimensional sensor grid. Both sensor types support an "Advanced Gesture Mode": When multiple fingers are detected, the touchpad sends alternating "Advanced Gesture Mode" (AGM) and "Simple Gesture Mode" (SGM) packets. The AGM packets have w=2, and contain reduced resolution finger data The SGM packets have w={0,1} and contain full resolution finger data Profile sensors try to report the "upper" (larger y value) finger in the SGM packet, and the lower (smaller y value) in the AGM packet. However, due to the nature of the profile sensor, they easily get confused when fingers cross, and can start reporting the x-coordinate of one with the y-coordinate of the other. Thus, for profile sensors, "semi-mt" was created, which reports a "bounding box" created by pairing min and max coordinates of the two pairs of reported fingers. Image sensors can report the actual coordinates of two of the fingers present. This patch detects if the touchpad is an image sensor and reports finger data using the MT-B protocol. NOTE: This patch only adds partial support for 2-finger gestures. The proper interpretation of the slot contents when more than two fingers are present is left to later patches. Also, handling of 'number of fingers' transitions is incomplete. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23Input: synaptics - refactor initialization of abs position axesDaniel Kurtz1-24/+20
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23Input: synaptics - refactor agm packet parsingDaniel Kurtz2-6/+19
When a Synaptics touchpad is in "AGM" mode, and multiple fingers are detected, the touchpad sends alternating "Advanced Gesture Mode" (AGM) and "Simple Gesture Mode" (SGM) packets. The AGM packets have w=2, and contain reduced resolution finger data. The SGM packets have w={0,1} and contain full resolution finger data. Refactor the parsing of agm packets to its own function, and rename the synaptics_data.mt field to .agm to indicate that it contains the contents of the last agm packet. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23Input: synaptics - refactor y inversionDaniel Kurtz1-3/+12
Synaptics touchpads report increasing y from bottom to top. This is inverted from normal userspace "top of screen is 0" coordinates. Thus, the kernel driver reports inverted y coordinates to userspace. This patch refactors this inversion. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-25Input: synaptics - fix reporting of min coordinatesDmitry Torokhov1-1/+1
We were testing wrong bit in the extended capability query. Reported-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13Input: lifebook - make dmi callback functions return 1Axel Lin1-2/+2
We only care about if there is a successful match from the table (or no match at all), so let's make dmi_check_system return immediately instead of iterating thorough the whole table. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-09Input: synaptics - set minimum coordinates as reported by firmwareDmitry Torokhov2-21/+43
Newer Synaptics firmware allows to query minimum coordinates reported by the device, let's use this data. Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: synaptics - process button bits in AGM packetsDaniel Kurtz1-16/+16
AGM packets contain valid button bits, too. This patch refactors packet processing to parse button bits in AGM packets. However, they aren't actually used or reported. The point is to more completely process AGM packets, and prepare for future patches that may actually use AGM packet button bits. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: synaptics - rename set_slot to be more descriptiveDaniel Kurtz1-7/+10
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: synaptics - fuzz position for touchpad with reduced filteringDaniel Kurtz2-10/+15
Synaptics touchpads indicate via a capability bit when they perform reduced filtering on position data. In such a case, use a non-zero fuzz value. Fuzz = 8 was chosen empirically by observing the raw position data reported by a clickpad indicating it had reduced filtering. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: synaptics - set resolution for MT_POSITION_X/Y axesDaniel Kurtz1-0/+3
Set resolution for MT_POSITION_X and MT_POSITION_Y to match ABS_X and ABS_Y, respectively. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29Input: update author email for gpio_mouse, at32psif, and atmel-wm97xxHans-Christian Egtvedt1-1/+1
This patch updates the email address of the gpio_mouse, at32psif, and atmel-wm97xx drivers supported by me to an email account I will use on a more regular basis in the future. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27Input: remove unneeded version.h includesJesper Juhl2-2/+0
It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/input/. This patch removes them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-24Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds2-17/+61
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits) Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander Input: tsc2007 - add X, Y and Z fuzz factors to platform data Input: tsc2007 - add poll_period parameter to platform data Input: tsc2007 - add poll_delay parameter to platform data Input: tsc2007 - add max_rt parameter to platform data Input: tsc2007 - debounce pressure measurement Input: ad714x - fix captouch wheel option algorithm Input: ad714x - allow platform code to specify irqflags Input: ad714x - fix threshold and completion interrupt masks Input: ad714x - fix up input configuration Input: elantech - remove support for proprietary X driver Input: elantech - report multitouch with proper ABS_MT messages Input: elantech - export pressure and width when supported Input: elantech - describe further the protocol Input: atmel_tsadcc - correct call to input_free_device Input: add driver FSL MPR121 capacitive touch sensor Input: remove useless synchronize_rcu() calls Input: ads7846 - fix gpio_pendown configuration Input: ads7846 - add possibility to use external vref on ads7846 Input: rotary-encoder - add support for half-period encoders ...
2011-05-19input/atari: Fix mouse movement and button mappingGeert Uytterhoeven1-4/+4
Up and down movements were reversed, left and right buttons were swapped. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-19input/atari: Fix atarimouse initMichael Schmitz1-2/+3
Atarimouse fails to load as a module (with ENODEV), due to a brown paper bag bug, misinterpreting the semantics of atari_keyb_init(). [geert] Propagate the return value of atari_keyb_init() everywhere Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-19input/atari: Use the correct mouse interrupt hookMichael Schmitz1-1/+1
The Atari keyboard driver calls atari_mouse_interrupt_hook if it's set, not atari_input_mouse_interrupt_hook. Fix below. [geert] Killed off atari_mouse_interrupt_hook completely, after fixing another incorrect assignment in atarimouse.c. Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-16Input: elantech - remove support for proprietary X driverÉric Piel1-12/+0
Apparently somewhere someone had a proprietary X driver. To get the multitouch info, it uses some hack on the normal API instead of using the multitouch protocol. Now that the multitouch info is transmitted correctly it makes not much sense to keep it. Especially because it's impossible to find this proprietary X driver anywhere, so the number of users must be very low. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - report multitouch with proper ABS_MT messagesÉric Piel1-5/+34
Multitouch info was reported only via a old protocol used by the proprietary X driver from elantech. Let's report the multitouch info also following the official MT protocol. It's semi-mt because the device only reports the lowest/highest coordinates. This was done following the multi-touch-protocol.txt documentation, and inspired by the bcm5974 and elantech implementations. Testing was light as there is not many applications using this protocol yet, but the X synaptics driver didn't complain and the X multitouch driver behaved correctly. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - export pressure and width when supportedÉric Piel2-1/+28
Using the info of the Dell/Ubuntu driver, described in the protocol document, report both width and pressure when pressing 1 and 3 fingers, for the versions of the touchpad which support it. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-07Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds3-3/+3
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
2011-03-31Fix common misspellingsLucas De Marchi3-3/+3
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31Input: synaptics - fix crash in synaptics_module_init()Jan Beulich1-2/+2
'struct dmi_system_id' arrays must always have a terminator to keep dmi_check_system() from looking at data (and possibly crashing) it isn't supposed to look at. The issue went unnoticed until ef8313bb1a22e7d2125d9d758aa8a81f1de91d81, but was introduced about a year earlier with 7705d548cbe33f18ea7713b9a07aa11047aaeca4 (which also similarly changed lifebook.c, but the problem there got eliminated shortly afterwards). The first hunk therefore is a stable candidate back to 2.6.33, while the full change is needed only on 2.6.38. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-18Merge branch 'next' into for-linusDmitry Torokhov3-12/+74
2011-03-12Input: bcm5974 - add support for MacBookPro8Andy Botting1-0/+20
This patch add multitouch support for the MacBookPro8,1 and MacBookPro8,2 models. Cc: stable@kernel.org Signed-off-by: Andy Botting <andy@andybotting.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-27Input: bcm5974 - Report button also for zero fingersHenrik Rydberg1-4/+4
With the current code, pressing the integrated button with an isolating tool does not result in any button report. Fixed with this this patch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-23Input: synaptics - document 0x0c queryDmitry Torokhov1-0/+23
Since Synaptics technical writers department is a bit slow releasing updated Synaptics interface guide, let's add some new bits (with their blessing) to the code so that they don't get lost. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-21Input: synaptics_i2c - convert to dev_pm_opsMark Brown1-7/+9
There is a general move to convert drivers to dev_pm_ops rather than bus specific PM ops in order to facilitate core development. Do this converison for synaptics-i2c. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-31Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-8/+24
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - retry failed resets when reconnecting Input: synaptics - fix reconnect logic on MT devices Input: tegra-kbc - fix keymap entry for LeftMeta key Input: tegra-kbc - fix build error
2011-01-28Input: synaptics - retry failed resets when reconnectingAlexandre Peixoto Ferreira1-2/+11
On some machines, like Dell Studio XPS 16 (1640), touchpad fails to respond to the standard query after first reset but may start responding later, so let's repeat reset sequence several (3) times. Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-28Input: synaptics - fix reconnect logic on MT devicesAlexandre Peixoto Ferreira1-6/+13
synaptics_set_advanced_gesture_mode() affect capabilities bits we should perform comparison after calling this function, otherwise they will never match and we will be forced to perform full reconnect. Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-20kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERTDavid Rientjes1-5/+5
The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option is used to configure any non-standard kernel with a much larger scope than only small devices. This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes references to the option throughout the kernel. A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Calling the option "EXPERT" more accurately represents its intention: only expert users who understand the impact of the configuration changes they are making should enable it. Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: David Woodhouse <david.woodhouse@intel.com> Signed-off-by: David Rientjes <rientjes@google.com> Cc: Greg KH <gregkh@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jens Axboe <axboe@kernel.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Robin Holt <holt@sgi.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-10Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hidLinus Torvalds1-0/+40
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits) HID: roccat: Update sysfs attribute doc HID: roccat: don't use #pragma pack HID: roccat: Add support for Roccat Kone[+] v2 HID: roccat: reduce number of functions in kone and pyra drivers HID: roccat: declare meaning of pack pragma usage in driver headers HID: roccat: use class for char device for sysfs attribute creation sysfs: Introducing binary attributes for struct class HID: hidraw: add compatibility ioctl() for 32-bit applications. HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report() HID: picolcd: fix misuse of logical operation in place of bitop HID: usbhid: base runtime PM on modern API HID: replace offsets values with their corresponding BTN_* defines HID: hid-mosart: support suspend/resume HID: hid-mosart: ignore buttons report HID: hid-picolcd: don't use flush_scheduled_work() HID: simplify an index check in hid_lookup_collection HID: Hoist assigns from ifs HID: Remove superfluous __inline__ HID: Use vzalloc for vmalloc/memset(,0...) HID: Add and use hid_<level>: dev_<level> equivalents ...
2011-01-06Merge branch 'next' into for-linusDmitry Torokhov5-89/+770
Conflicts: include/linux/input.h
2010-12-27Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rydberg/input-mt into nextDmitry Torokhov2-5/+93
2010-12-23Input: psmouse - disable the synaptics extension on OLPC machinesAndres Salomon1-0/+30
OLPC has switched to a Synaptics touchpad. It turns out that it's pretty useless in absolute mode. This patch looks for an OLPC system (via DMI tables), and refuses to init Synaptics mode in that scenario (falling back to relative mode). Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-23Input: psmouse - fix up Synaptics commentAndres Salomon1-2/+2
Minor comment fixup for typos and grammar. Noticed while adding a separate workaround. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-22Input: synaptics - ignore bogus mt packetHenrik Rydberg1-2/+2
In multitouch mode, at least one device (fw: 7.4 id: 0x1c0b1) sometimes sends a final main packet with x == 1. Since the normal values are above 1472, this is clearly bogus. At the same time, a two-finger touch is signaled, even though only one finger was on the pad to begin with. This patch ignores the packet altogether, removing the problem. Acked-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-21Input: synaptics - add multi-finger and semi-mt supportHenrik Rydberg2-3/+88
The Synaptics 2.7 series of touchpads support a mode for reporting two sets of X/Y/Pressure data (advanced gesture mode). By default, these devices report only single finger data, depriving userspace of the nowadays ubiquitous two-finger scroll gesture. Enabling advanced gesture mode also enables the multi-finger report, although the device does not claim that capability. Up to three fingers can be reported this way. While two or three fingers are touching, the normal packet is prepended by a reduced finger packet of lower resolution. From the two packets (which do not represent the actual fingers), the bounding rectangle of the individual contacts can be extracted. This information is sufficient to perform scaling gestures and a limited form of rotation gesture. The behavior has been coined semi-mt capability, and is signaled to userspace via the INPUT_PROP_SEMI_MT device property. Work to decode the advanced gesture packet: Takashi Iwai. Cleanup and testing of the original patch: Chase Douglas. Minor cleanup and testing: Chris Bagwell. Finalization and semi-mt support: Henrik Rydberg. Reported-by: Tobyn Bertram Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-21Input: synaptics - report clickpad propertyHenrik Rydberg1-0/+3
With the new input property interface, it is possible to report the special quirks of a device using ioctl/sysfs. This patch sets up the device as a pointer, and reports the clickpad functionality via the INPUT_PROP_BUTTONPAD property. Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-10Merge branch 'master' into upstreamJiri Kosina6-13/+40
2010-11-30Input: synaptics - fix handling of 2-button ClickPadsYan Li1-1/+2
Lenovo S10-3t's ClickPad is a 2-button ClickPad that reports BTN_LEFT and BTN_RIGHT as normal touchpad, unlike the 1-button ClickPad used in HP mini 210 that reports solely BTN_MIDDLE. In 0xc0-cap response, the 1-button ClickPad has the 20-bit set while 2-button ClickPad has the 8-bit set. This patch makes the kernel only handle 1-button ClickPad specially, and treat 2-button ClickPad in the same fashion as regular touchpads. This fixes kernel bug #18122 and MeeGo bug #4807. Signed-off-by: Yan Li <yan.i.li@intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15input: bcm5974: Add support for MacBookAir3Edgar (gimli) Hucek1-0/+40
This patch adds support for the MacBookAir3,1 and MacBookAir3,2 models. [rydberg@euromail.se: touchpad range calibration] Cc: stable@kernel.org Signed-off-by: Edgar (gimli) Hucek <gimli@dark-green.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-15Input: hgpk - fix powersave modePaul Fox1-9/+17
Recent testing of this codepath showed that it wasn't working, perhaps due to changes within the input layer. This fixes it. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: hgpk - recalibration tweaksDaniel Drake1-9/+22
Disable the recalibration guard where new recalibrations are triggered if we detect a packet too soon after calibrating - we found that this results in erroneous recalibrations, and if the recalibration failed then the rest of our badness-detection code will request another. Add a module option disabling all of the recalibration code, in case an OLPC deployment thinks all of the workarounds we have are doing more damage than good and wants to experiment with them all disabled. Based on work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: hgpk - detect simple mode overflowsDaniel Drake1-0/+5
Based on work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: hgpk - extend jumpiness detectionDaniel Drake2-20/+88
In addition to forcing recalibrations upon detection of cursor jumps (and performing them quicker than before), detect and discard errant 'jump' packets caused by a firmware bug, which are then repeated with each one being approximately half the delta of the one previously (as if it is averaging out) Based on original work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: hgpk - rework spew detectionDaniel Drake2-32/+103
The old implementation of spew detection simply tracked the overall position delta of the cursor over every 100 packets. We found that this causes occasional false positives in spew detection, and also that the conditions of the spewy packets are perhaps more fixed than we once thought. Rework the spew detection to look for packets of specific small delta, and only recalibrating if the overall movement delta stays within expected bounds. Also discard duplicate packets in the advanced mode, which appear to be very common. If we don't, the spew detection kicks in far too early. If we get a large spew of duplicates, request a recalibration straight up. Based on earlier work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: hgpk - support GlideSensor and PenTablet modesDaniel Drake3-43/+441
Add a "hgpk_mode" sysfs attribute that allows selection between 3 options: Mouse (the existing option), GlideSensor and PenTablet. GlideSensor is an enhanced protocol for the regular touchpad mode that additionally reports pressure and uses absolute coordinates. We suspect that it may be more reliable than mouse mode in some environments. PenTablet mode puts the touchpad into resistive mode, you must then use a stylus as an input. We suspect this is the most reliable way to drive the touchpad. The GlideSensor and PenTablet devices expose themselves with the intention of being combined with the synaptics X11 input driver. Based on earlier work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>