aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-11-25Input: elantech - trust firmware about trackpoint presenceDmitry Torokhov1-9/+1
Only try to parse data as coming from trackpoint if firmware told us that trackpoint is present. Fixes commit caeb0d37fa3e387eb0dd22e5d497523c002033d1 Reported-and-tested-by: Marcus Overhagen <marcus.overhagen@gmail.com> Reported-and-tested-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-16Input: synaptics - adjust min/max on Thinkpad E540Ben Sagal1-0/+4
The LEN2006 Synaptics touchpad (as found in Thinkpad E540) returns wrong min max values. touchpad-edge-detector output: > Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6 > Move one finger around the touchpad to detect the actual edges > Kernel says: x [1472..5674], y [1408..4684] > Touchpad sends: x [1264..5675], y [1171..4688] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88211 Cc: stable@vger.kernel.org Signed-off-by: Binyamin Sagal <bensagal@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-13Input: elantech - provide a sysfs knob for crc_enabledUlrik De Bie1-0/+2
The detection of crc_enabled is known to fail for Fujitsu H730. A DMI blacklist is added for that, but it can be expected that other laptops will pop up with this. Here a sysfs knob is provided to alter the behaviour of crc_enabled. Writing 0 or 1 to it sets the variable to 0 or 1. Reading it will show the crc_enabled variable (0 or 1). Reported-by: Stefan Valouch <stefan@valouch.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-13Input: elantech - report the middle button of the touchpadUlrik De Bie1-0/+19
In the past, no elantech was known with 3 touchpad mouse buttons. Fujitsu H730 is the first known elantech with a middle button. This commit enables this middle button. For backwards compatibility, the Fujitsu is detected via DMI, and only for this one 3 buttons will be announced. Reported-by: Stefan Valouch <stefan@valouch.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-13Input: alps - ignore bad data on Dell Latitudes E6440 and E7440Pali Rohár1-1/+16
Sometimes on Dell Latitude laptops psmouse/alps driver receive invalid ALPS protocol V3 packets with bit7 set in last byte. More often it can be reproduced on Dell Latitude E6440 or E7440 with closed lid and pushing cover above touchpad. If bit7 in last packet byte is set then it is not valid ALPS packet. I was told that ALPS devices never send these packets. It is not know yet who send those packets, it could be Dell EC, bug in BIOS and also bug in touchpad firmware... With this patch alps driver does not process those invalid packets, but instead of reporting PSMOUSE_BAD_DATA, getting into out of sync state, getting back in sync with the next byte and spam dmesg we return PSMOUSE_FULL_PACKET. If driver is truly out of sync we'll fail the checks on the next byte and report PSMOUSE_BAD_DATA then. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-09Input: alps - allow up to 2 invalid packets without resetting devicePali Rohár1-0/+3
On some Dell Latitude laptops ALPS device or Dell EC send one invalid byte in 6 bytes ALPS packet. In this case psmouse driver enter out of sync state. It looks like that all other bytes in packets are valid and also device working properly. So there is no need to do full device reset, just need to wait for byte which match condition for first byte (start of packet). Because ALPS packets are bigger (6 or 8 bytes) default limit is small. This patch increase number of invalid bytes to size of 2 ALPS packets which psmouse driver can drop before do full reset. Resetting ALPS devices take some time and when doing reset on some Dell laptops touchpad, trackstick and also keyboard do not respond. So it is better to do it only if really necessary. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-08Input: alps - ignore potential bare packets when device is out of syncPali Rohár1-1/+7
5th and 6th byte of ALPS trackstick V3 protocol match condition for first byte of PS/2 3 bytes packet. When driver enters out of sync state and ALPS trackstick is sending data then driver match 5th, 6th and next 1st bytes as PS/2. It basically means if user is using trackstick when driver is in out of sync state driver will never resync. Processing these bytes as 3 bytes PS/2 data cause total mess (random cursor movements, random clicks) and make trackstick unusable until psmouse driver decide to do full device reset. Lot of users reported problems with ALPS devices on Dell Latitude E6440, E6540 and E7440 laptops. ALPS device or Dell EC for unknown reason send some invalid ALPS PS/2 bytes which cause driver out of sync. It looks like that i8042 and psmouse/alps driver always receive group of 6 bytes packets so there are no missing bytes and no bytes were inserted between valid ones. This patch does not fix root of problem with ALPS devices found in Dell Latitude laptops but it does not allow to process some (invalid) subsequence of 6 bytes ALPS packets as 3 bytes PS/2 when driver is out of sync. So with this patch trackstick input device does not report bogus data when also driver is out of sync, so trackstick should be usable on those machines. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-08Input: elantech - fix crc_enabled for Fujitsu H730Ulrik De Bie1-1/+18
The Fujitsu H730 does not work with crc_enabled = 0, even though the crc_enabled bit in the firmware version indicated it would. When switching this value to crc_enabled to 1, the touchpad works. This patch uses DMI to detect H730. Reported-by: Stefan Valouch <stefan@valouch.com> Tested-by: Stefan Valouch <stefan@valouch.com> Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-08Input: elantech - use elantech_report_trackpoint for hardware v4 tooUlrik De Bie1-2/+14
The Fujitsu H730 has hardware v4 with a trackpoint. This enables the elantech_report_trackpoint for v4. Reported-by: Stefan Valouch <stefan@valouch.com> Tested-by: Stefan Valouch <stefan@valouch.com> Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-06Input: synaptics - add min/max quirk for Lenovo T440sTakashi Iwai1-2/+3
The new Lenovo T440s laptop has a different PnP ID "LEN0039", and it needs the similar min/max quirk to make its clickpad working. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=903748 Reported-and-tested-by: Joschi Brauchle <joschibrauchle@gmx.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-28Input: psmouse - remove unneeded check in psmouse_reconnect()Dmitry Torokhov1-7/+0
psmouse_reconnect() will not be called if psmouse driver is not bound to the serio port, so there is no point in checking that. Also, as coded, it introduces potential NULL dereference in psmouse_dbg() in case psmouse is indeed NULL. Let's just remove it. Detected by Coverity: CID 146528 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-28Input: vsxxxaa - fix code dropping bytes from queueDmitry Torokhov1-1/+1
I believe the intent of the code was to drop oldest bytes from the queue, not the latest if we drop one byte and both latest and some oldest of we are dropping more than one. Acked-by: Jan-Benedict Glaw <jbglaw@lug-owl.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-15Input: alps - fix v4 button press recognitionAndreas Bosch1-2/+2
Since the change to struct input_mt_pos some variables are now bitfields instead of integers. Automatic conversion from integer to bitfield entry destroys information, therefore enforce boolean interpretation instead. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1114768 Fixes: 02d04254a5df ("Input: alps - use struct input_mt_pos to track coordinates") Signed-off-by: Andreas Bosch <linux@progandy.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-11Input: synaptics - gate forcepad support by DMI checkDmitry Torokhov2-7/+23
Unfortunately, ForcePad capability is not actually exported over PS/2, so we have to resort to DMI checks. Cc: stable@vger.kernel.org Reported-by: Nicole Faerber <nicole.faerber@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-11Merge tag 'v3.17' into nextDmitry Torokhov8-27/+222
Synchronize with mainline to bring in changes to Synaptics and i8042 drivers.
2014-09-15Input: psmouse - add support for detecting FocalTech PS/2 touchpadsHans de Goede4-1/+91
The Asus X450 and X550 laptops use a PS/2 touchpad from a new manufacturer called FocalTech: https://bugzilla.kernel.org/show_bug.cgi?id=77391 https://bugzilla.redhat.com/show_bug.cgi?id=1110011 The protocol for these devices is not known at this time, but even without knowing the protocol they need some special handling. They get upset by some of our other PS/2 device probing, and once upset generate random mouse events making things unusable even with an external mouse. This patch adds detection of these devices based on their pnp ids, and when they are detected, treats them as a bare ps/2 mouse. Doing things this way they at least work in their ps/2 mouse emulation mode. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-12Input: psmouse - add psmouse_matches_pnp_id helper functionHans de Goede3-14/+18
The matches_pnp_id function from the synaptics driver is useful for other drivers too. Make it a generic psmouse helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-09Input: synaptics - add support for ForcePadsDmitry Torokhov2-16/+63
ForcePads are found on HP EliteBook 1040 laptops. They lack any kind of physical buttons, instead they generate primary button click when user presses somewhat hard on the surface of the touchpad. Unfortunately they also report primary button click whenever there are 2 or more contacts on the pad, messing up all multi-finger gestures (2-finger scrolling, multi-finger tapping, etc). To cope with this behavior we introduce a delay (currently 50 msecs) in reporting primary press in case more contacts appear. Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-08Input: add missing POINTER / DIRECT properties to a bunch of driversHans de Goede5-0/+10
I've not done a full audit of all mouse drivers, I noticed these ones were missing the POINTER property while working on the POINTING_STICK property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-08Input: add INPUT_PROP_POINTING_STICK propertyHans de Goede4-0/+9
It is useful for userspace to know that there not dealing with a regular mouse but rather with a pointing stick (e.g. a trackpoint) so that userspace can e.g. automatically enable middle button scrollwheel emulation. It is impossible to tell the difference from the evdev info without resorting to putting a list of device / driver names in userspace, this is undesirable. Add a property which allows userspace to see if a device is a pointing stick, and set it on all the pointing stick drivers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-08Input: elantech - fix detection of touchpad on ASUS s301lHans de Goede1-0/+7
Adjust Elantech signature validation to account fo rnewer models of touchpads. Cc: stable@vger.kernel.org Reported-and-tested-by: Màrius Monton <marius.monton@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-26Input: elantech - add support for trackpoint found on some v3 modelsUlrik De Bie2-9/+130
Some elantech v3 touchpad equipped laptops also have a trackpoint, before this commit, these give sync errors. With this patch, the trackpoint is provided as another input device: 'Elantech PS/2 TrackPoint' The patch will also output messages that do not follow the expected pattern. In the mean time I've seen 2 unknown packets occasionally: 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 0x00 , 0x00 , 0x00 , 0x02 , 0x00 , 0x00 I don't know what those are for, but they can be safely ignored. Currently all packets that are not known to v3 touchpad and where packet[3] (the fourth byte) lowest nibble is 6 are now recognized as PACKET_TRACKPOINT and processed by the new elantech_report_trackpoint. This has been verified to work on a laptop Lenovo L530 where the touchpad/trackpoint combined identify themselves as: psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x350f02) psmouse serio1: elantech: Synaptics capabilities query result 0xb9, 0x15, 0x0c. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-26Input: elantech - reset the device when elantech probe failsUlrik De Bie1-0/+1
elantech_init() calls elantech_set_absolute_mode which sets the driver in an absolute mode. When after this the elantech_init fails, it is best to turn the ps/2 mouse emulation mode back on by calling psmouse_reset() so that it can work as a regular mouse. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-26Input: ALPS - suppress message about 'Unknown touchpad'Dmitry Torokhov1-2/+2
When we fail to match data returned by E7 and EC reports we state that we found "Unknown ALPS touchpad" whereas it is most likely it is not ALPS touchpad at all. Change wording a bit and reduce the message to debug so that it does not litter users logs and confuse them. Reported-by: Paul Menzel <paulepanter@users.sourceforge.net> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-14Merge branch 'next' into for-linusDmitry Torokhov1-3/+69
Prepare second round of input updates for 3.17.
2014-08-08Input: synaptics - use firmware data for Cr-48Henrik Rydberg1-2/+68
The profile sensor clickpad in a Cr-48 Chromebook does a reasonable job of tracking individual fingers. This tracking isn't perfect, but, experiments show that it works better than just passing "semi-mt" data to userspace, and making userspace try to deduce where the fingers are given a bounding box. This patch tries to report correct two-finger positions instead of the {(min_x, min_y), (max_x, max_y)} for profile sensor clickpads on Cr-48 chromebooks. Note that this device's firmware always reports the higher (smaller y) finger in the "sgm" packet, and the lower (larger y) finger in the "agm" packet. Thus, when a new finger arrives on the pad, the kernel driver uses input core's contact tracking facilities to match contacts with slots. Inspired by patch by Daniel Kurtz <djkurtz@chromium.org> and Chung-yih Wang <cywang@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-07Input: synaptics - properly initialize slots for semi-MTDmitry Torokhov1-3/+3
Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually. Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Merge branch 'next' into for-linusDmitry Torokhov2-243/+508
Prepare first round of input updates for 3.17.
2014-07-30Input: alps - Rushmore and v7 resolution supportHans de Goede2-0/+50
Add support for querying the physical size from the touchpad for Rushmore and v7 touchpads, and use that to tell userspace the device resolution. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - add support for v7 devicesYunkang Tang2-3/+280
Such as found on the new Toshiba Portégé Z30-A and Z40-A. Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com> [hdegoede@redhat.com: Remove softbutton handling, this is done in userspace] [hdegoede@redhat.com: Report INPUT_PROP_BUTTONPAD] [hdegoede@redhat.com: Do not report fake PRESSURE, reporting BTN_TOUCH is enough] [hdegoede@redhat.com: Various cleanups / refactoring] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - cache firmware versionHans de Goede2-0/+5
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - change decode function prototype to return an intHans de Goede2-4/+10
So that decode functions can return a failure when appropriate. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - report 2 touches when we've > 2 fingersHans de Goede1-1/+1
If we detect more then 2 fingers report 2 touches, rather then only reporting the upper left corner of the bounding box. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - add an alps_report_semi_mt_data functionHans de Goede1-47/+29
Move all the semi-mt specific handling shared between the v3 and v4 handling code to a common helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - use single touch data when v3 mt data contains only one fingerHans de Goede1-1/+1
For v3 protocol devices, use the more accurate single touch data when the mt data contains only one finger. Note the mt data reporting a finger count of 1 should never happen, but better safe then sorry. This brings the v3 bitmap handling in line with what the v4 code does, allowing to factor out the common bits into a helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - use standard contact tracking instead of DIYHans de Goede1-36/+16
When there are 2 fingers on the pad we don't know which one is which, so use input_mt_assign_slots to make sure the right set of coordinates ends up in the right slot. Besides ensuring things end up in the right slot, this also results in a nice cleanup, since sync_frame also handles non mt position and btn_touch reporting. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - use struct input_mt_pos to track coordinatesHans de Goede2-122/+104
This is a preparation patch for switching the DIY mt handling to using input_mt_assign_slots && input_mt_sync_frame. struct alps_fields is quite large, so while making changes to almost all uses of it lets put it in our priv data instead of on the stack. Having it in our priv data also allows using it directly for storing values which need to be cached, rather then having separate x, y, z, fingers, etc. copies in our priv data. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - process_bitmap: round down when spreading adjescent fingers over 2 pointsHans de Goede1-2/+2
This fixes 2 fingers at the same height or width on the touchpad getting reported at different y / x coordinates. Note num_bits is always at least 1. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - process_bitmap: fix counting of high point bitsHans de Goede1-2/+1
alps_process_bitmap was resetting the point bit-count as soon as it saw 2 0 bits in a row. This means that unless the high point actually is at the end of the bitmap, it would always get its num_bits set to 0. Instead reset num_bits to 0 on a 0->1 transition, so that with > 2 fingers we only count the number of bits occupied by the highest finger. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - process_bitmap: add alps_get_bitmap_points() helper functionHans de Goede2-45/+35
Factor out the identical code for getting the bitmap points for x and y into a helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - process_bitmap: don't invert the Y-axis on RushmoreHans de Goede2-9/+12
Rushmore models don't have the Y-axis data in the bitmap inverted. Since we now have 2 different Y orientations, make the Y bitmap data processing use a forward loop like the X bitmap data processing, unifying the 2, and invert the data later, except on Rushmore. So far no-one has noticed this because the synaptics driver only uses the non mt coordinates (except on clickpads, and there are no alps clickpads using process_bitmap). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - improve 2-finger reporting on v3 modelsHans de Goede1-36/+24
V3 models only report mt bitmap data when there are 2 or more fingers on the touchpad. So always generate 2 positions in alps_process_bitmap, and for v3 models only fall back to st data when there was no mt data in a mt packet (which should never happen). This fixes 2 finger scrolling not working when using 2 fingers close to each other. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - fix rushmore packet decodingYunkang Tang1-0/+3
Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-14Input: synaptics - add min/max quirk for pnp-id LEN2002 (Edge E531)Hans de Goede1-2/+3
https://bugzilla.redhat.com/show_bug.cgi?id=1114768 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-06-07Merge branch 'next' into for-linusDmitry Torokhov2-7/+22
Prepare input updates for 3.16.
2014-06-07Input: synaptics - fix resolution for manually provided min/maxBenjamin Tissoires1-9/+10
commit 421e08c41fda fixed the reported min/max for the X and Y axis, but unfortunately, it broke the resolution of those same axis. On the t540p, the resolution is the same regarding X and Y. It is not a problem for xf86-input-synaptics because this driver is only interested in the ratio between X and Y. Unfortunately, xf86-input-cmt uses directly the resolution, and having a null resolution leads to some divide by 0 errors, which are translated by -infinity in the resulting coordinates. Reported-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-06-07Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is setHans de Goede1-2/+3
The touchpad on the GIGABYTE U2442 not only stops communicating when we try to set bit 3 (enable real hardware resolution) of reg_10, but on some BIOS versions also when we set bit 1 (enable two finger mode auto correct). I've asked the original reporter of: https://bugzilla.kernel.org/show_bug.cgi?id=61151 To check that not setting bit 1 does not lead to any adverse effects on his model / BIOS revision, and it does not, so this commit fixes the touchpad not working on these versions by simply never setting bit 1 for laptop models with the no_hw_res quirk. Reported-and-tested-by: James Lademann <jwlademann@gmail.com> Tested-by: Philipp Wolfer <ph.wolfer@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-06-07Input: elantech - deal with clickpads reporting right button eventsHans de Goede1-4/+18
At least the Dell Vostro 5470 elantech *clickpad* reports right button clicks when clicked in the right bottom area: https://bugzilla.redhat.com/show_bug.cgi?id=1103528 This is different from how (elantech) clickpads normally operate, normally no matter where the user clicks on the pad the pad always reports a left button event, since there is only 1 hardware button beneath the path. It looks like Dell has put 2 buttons under the pad, one under each bottom corner, causing this. Since this however still clearly is a real clickpad hardware-wise, we still want to report it as such to userspace, so that things like finger movement in the bottom area can be properly ignored as it should be on clickpads. So deal with this weirdness by simply mapping a right click to a left click on elantech clickpads. As an added advantage this is something which we can simply do on all elantech clickpads, so no need to add special quirks for this weird model. Reported-and-tested-by: Elder Marco <eldermarco@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-26Input: synaptics - change min/max quirk table to pnp-id matchingHans de Goede1-113/+36
Most of the affected models share pnp-ids for the touchpad. So switching to pnp-ids give us 2 advantages: 1) It shrinks the quirk list 2) It will lower the new quirk addition frequency, ie the recently added W540 quirk would not have been necessary since it uses the same LEN0034 pnp ids as other models already added before it As an added bonus it actually puts the quirk on the actual psmouse, rather then on the machine, which is technically more correct. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-26Input: synaptics - add a matches_pnp_id helper functionHans de Goede1-11/+14
This is a preparation patch for simplifying the min/max quirk table. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>