aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse
AgeCommit message (Collapse)AuthorFilesLines
2015-03-08Input: synaptics - skip quirks when post-2013 dimensionsBenjamin Tissoires1-1/+1
Post-2013 Lenovo laptops provide correct min/max dimensions, which are different with the ones currently quirked. According to https://bugzilla.kernel.org/show_bug.cgi?id=91541 the following board ids are assigned in the post-2013 touchpads: t440p/t440s: LEN0036 -> 2964/2962 t540p: LEN0034 -> 2964 Using 2961 as the common minimum makes these 3 laptops OK. We may need to update those values later if other pnp_ids has a lower board_id. Cc: [email protected] Signed-off-by: Benjamin Tissoires <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-08Input: synaptics - support min/max board id in min_max_pnpid_tableDaniel Martin1-12/+30
Add a min/max range for board ids to the min/max coordinates quirk. This makes it possible to restrict quirks to specific models based upon their board id. The define ANY_BOARD_ID (0) serves as a wild card. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=91541 Cc: [email protected] Signed-off-by: Daniel Martin <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-08Input: synaptics - remove obsolete min/max quirk for X240Daniel Martin1-1/+1
The firmware of the X240 (LEN0035, 2013/12) exposes the same values x [1232..5710], y [1156..4696] as the quirk applies. Cc: [email protected] Signed-off-by: Daniel Martin <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-08Input: synaptics - query min dimensions for fw v8.1Daniel Martin1-2/+8
Query the min dimensions even if the check SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 fails, but we know that the firmware version 8.1 is safe. With that we don't need quirks for post-2013 models anymore as they expose correct min and max dimensions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=91541 Cc: [email protected] Signed-off-by: Daniel Martin <[email protected]> re-order the tests to check SYN_CAP_MIN_DIMENSIONS even on FW 8.1 Signed-off-by: Benjamin Tissoires <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-08Input: synaptics - log queried and quirked dimension valuesDaniel Martin1-0/+10
Logging the dimension values we queried and the values we use from a quirk to overwrite can be helpful for debugging. This partly relates to bug: https://bugzilla.kernel.org/show_bug.cgi?id=91541 Cc: [email protected] Signed-off-by: Daniel Martin <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-08Input: synaptics - split synaptics_resolution(), query firstDaniel Martin1-12/+23
Split the function synaptics_resolution() into synaptics_resolution() and synaptics_quirks(). synaptics_resolution() will be called before synaptics_quirks() to query dimensions and resolutions before overwriting them with quirks. Cc: [email protected] Signed-off-by: Daniel Martin <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-08Input: elan_i2c - remove duplicate repeat codeDuson Lin1-1/+0
Remove duplicate "repeat--" from function elan_initialize. Signed-off-by: Duson Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-07Input: elan_i2c - return error code when resume failsDuson Lin2-6/+18
In order to better diagnose potential issues let's return error to the upper layers when resuming the device fails and also add a few diagnostic messages. Signed-off-by: Duson Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-07Input: psmouse - disable "palm detection" in the focaltech driverMathias Gottschlag1-10/+0
Apparently, the threshold for large contact area seems to be rather low on some devices, causing the touchpad to frequently freeze during normal usage. Because we do now know how we are supposed to use the value in question, this commit just drops the related code completely. Signed-off-by: Mathias Gottschlag <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-07Input: psmouse - disable changing resolution/rate/scale for FocalTechMathias Gottschlag3-1/+44
These PS/2 commands make some touchpads stop responding, so this commit adds some dummy functions to replace the generic implementation. Because scale changes were not encapsulated in a method of struct psmouse yet, this commit adds a method set_scale to psmouse. Signed-off-by: Mathias Gottschlag <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-07Input: psmouse - ensure that focaltech reports consistent coordinatesMathias Gottschlag1-2/+10
We don't know whether x_max or y_max really hold the maximum possible coordinates, and we don't know for sure whether we correctly interpret the coordinates sent by the touchpad, so we clamp the reported values to prevent confusion in userspace code. Signed-off-by: Mathias Gottschlag <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-07Input: psmouse - remove hardcoded touchpad size from the focaltech driverMathias Gottschlag1-4/+1
The size has in most cases already been fetched from the touchpad, the hardcoded values should have been removed. Signed-off-by: Mathias Gottschlag <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-06Input: synaptics - switch ForcePad detection to PNP IDsDmitry Torokhov2-21/+15
According to Synaptics devices with ForcePads use SYN300D and SYN3014 as PNP IDs, so let's switch from DMI-bases detection scheme to PNP-based one, which should be more reliable. Suggested-by: Hans de Goede <[email protected]> Acked-by: Hans de Goede <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-06Input: psmouse - when comparing PNP IDs ignore caseDmitry Torokhov1-7/+33
PNP IDs are supposed to be case-insensitive and so we should compare them as such. Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-04Input: ALPS - fix memory leak when detection failsDmitry Torokhov1-1/+3
This fixes memory leak introduced by commit a09221e83e13e09a33109b9b037484eade901cea Acked-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-02Input: cyapa - remove superfluous type check in cyapa_gen5_read_idac_data()Geert Uytterhoeven1-1/+1
drivers/input/mouse/cyapa_gen5.c: In function ‘cyapa_gen5_read_idac_data’: drivers/input/mouse/cyapa_gen5.c:1876: warning: ‘max_element_cnt’ may be used uninitialized in this function drivers/input/mouse/cyapa_gen5.c:1873: warning: ‘offset’ may be used uninitialized in this function If *data_size is non-zero, and idac_data_type contains an unknown type, max_element_cnt and offset will be uninitialized, and the loop will process non-existing data. However, this cannot happen (for now), as there's a test for unknown types at the top of cyapa_gen5_read_idac_data(). As no "if ... else if ..." is used in other places, remove the superfluous "if" to silence the compiler warning. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Dudley Du <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-03-02Input: cyapa - fix unaligned functions redefinition errorDudley Du2-2/+2
Use asm/unaligned.h instead of linux/unaligned/access_ok.h header file to fix compiling issues such as following while doing cross platform compiling: "include/linux/unaligned/access_ok.h:7:19: error: redefinition of 'get_unaligned_le16' ... include/linux/unaligned/le_struct.h:6:19: note: previous definition of 'get_unaligned_le16' was here". Reported-by: kbuild test robot <[email protected]> Signed-off-by: Dudley Du <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: psmouse - use IS_ENABLED instead of homegrown codeDmitry Torokhov7-35/+3
Instead of having various protocols provide <protocol>_supported() functions, let's use IS_ENABLED() macro that works well in "if" statements. Acked-by: Hans de Goede <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Merge branch 'bfin_rotary' into nextDmitry Torokhov2-3/+22
Merge bfin_rotary driver changes from Sonic Zhang.
2015-02-15Input: ALPS - move v7 packet info to Documentation and v6 packet infoPali Rohár1-39/+0
This patch move all packet info from driver source code to documentation and adds info about v6 packet format (from driver source code). Signed-off-by: Pali Rohár <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - fix confusing comment in protocol dataDmitry Torokhov1-7/+8
The comment about suspicions entry 0x20, 0x02, 0x0e has over time drifted away and it become hard to figure out what it meant. Let's move it back so it is clear. Reported-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - do not mix trackstick and external PS/2 mouse dataPali Rohár2-53/+151
Previously dev2 device was used for both external PS/2 mouse and internal trackstick device (if available). This change introduces dev3 device which is used for external PS/2 mouse data and dev2 is now used only for trackstick. In case that trackstick is not present dev2 is not created, so userspace does not see non existent device in system. Because laptops with ALPS devices often do not use i8042 active multiplexing all data (from touchpad, trackstick and external PS/2 mouse) come to one port. So it is not possible to know if external PS/2 mouse is connected or not. In most cases external PS/2 mouse is not connected so driver will create dev3 input device after first bare PS/2 packet will be received. So there will not be "ghost" input device. This change also helps in identifying possible problems in future if driver decides to report 6-bytes trackstick packets as 3-bytes bare PS/2 (data will be reported to dev3 instead dev2). Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - fix trackstick detection on some Dell LatitudesDmitry Torokhov1-22/+56
On some Dell Latitudes we fail to identify presence of trackstick unless we reset the device. The issue is quite benign as we do perform reset in alps_init(), so the trackstick ends up working, but mouse name reported to userspace is not accurate. In order to fix the issue while avoiding the additional lengthy reset we move the resrt to alps_detect() and keep the discovered state to be used later in alps_init(). Reported-by: Pali Rohár <[email protected]> Tested-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - consolidate setting protocol parametersDmitry Torokhov1-64/+67
Move setting of all protocol properties into alps_set_protocol (former alps_set_defaults) instead of having it split between several functions. Tested-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - split protocol data from model infoDmitry Torokhov2-38/+46
In preparation of reworking the way we set protocol parameters let's split certain protocol items from alps_model_info into a separate structure. Tested-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - make Rushmore a separate protocolDmitry Torokhov2-11/+19
Even though Rushmore is very close to V3 protocol it is sufficiently different to warrant it's own protocol name. Tested-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-15Input: ALPS - renumber protocol numbersDmitry Torokhov2-16/+16
In order to accommodate new protocol number for Rushmore touchpads let's shift protocol numbers by 8 bits (i.e. 1 -> 0x100) - this way we keep protocol version reported in input device id the same as it was, but add some holes in numbering. Tested-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-06Input: elan_i2c - fix wrong %p extensionRasmus Villemoes1-1/+1
There's no %px extension. From the context I think the intention was to dump the five bytes which were not as expected, and for that one should use %ph. Signed-off-by: Rasmus Villemoes <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-03Input: synaptics - use dmax in input_mt_assign_slotsBenjamin Tissoires1-1/+4
When tapping a clickpad with two fingers, there is a chance that the sensor sees first only one finger, and at the next scan only the second one. In this case, the sensors says that there has been only one finger on the clickpad, which moved really fast between two scans. We can try to counter this by adding a limit to what an actual finger can move between 2 scans. A distance of 1cm between two scans for one finger seems reasonable. However, this is not really accurate because the resolution in X and in Y differs. But heh, that's how the in-kernel tracking works right now, and its job is quite good, even with this approximation. This parameter solves most of the jumps observed, not all of them however. But this is a hardware defect, and we might not be able to get something better without much heavier computations. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=76722 Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-01Merge branch 'for-linus' of ↵Linus Torvalds2-3/+20
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer updates from Dmitry Torokhov: "Just a few quirks for PS/2 this time" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elantech - add more Fujtisu notebooks to force crc_enabled Input: i8042 - add noloop quirk for Medion Akoya E7225 (MD98857) Input: synaptics - adjust min/max for Lenovo ThinkPad X1 Carbon 2nd
2015-02-01Input: elantech - add more Fujtisu notebooks to force crc_enabledRainer Koenig1-0/+16
Add two more Fujitsu LIFEBOOK models that also ship with the Elantech touchpad and don't work with crc_disabled to the quirk list. Signed-off-by: Rainer Koenig <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2015-02-01Input: MT - add support for balanced slot assignmentHenrik Rydberg4-4/+4
Some devices are not fast enough to differentiate between a fast-moving contact and a new contact. This problem cannot be fully resolved because information is truly missing, but it is possible to safe-guard against obvious mistakes by restricting movement with a maximum displacement. The new problem formulation for dmax > 0 cannot benefit from the speedup for positive definite matrices, but since the convergence is faster, the result is about the same. For a handful of contacts, the latency difference is truly negligible. Suggested-by: Benjamin Tissoires <[email protected]> Tested-by: Benjamin Tissoires <[email protected]> Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-23Input: elan_i2c - verify firmware signature applying itDuson Lin4-14/+15
To allow for different firmware sizes let's replace the original size check with with checking the signature in the firmware data. Signed-off-by: Duson Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-22Input: elantech - remove stale comment from KconfigDmitry Torokhov1-9/+2
The fixes to the X.org driver have been applied long time ago and the patch on kernel.org has long since gone so let's remove the comment. Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-22Input: cyapa - off by one in cyapa_update_fw_store()Dan Carpenter1-1/+1
If "(count == NAME_MAX)" then we could end up putting the NUL terminator one space beyond the end of the fw_name[] array. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-22Input: cyapa - fix variable being dereferenced before checkDudley Du1-1/+3
Fixes the warning regarding variable being dereferenced before check 'gen5_pip->resp_len'. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Dudley Du <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-22Input: cyapa - fix endianness issues in gen5 firmware update supportDmitry Torokhov1-39/+40
gen5_bl_metadata_row_params structure has its fields specified with explicit endianness, so we should not be trying to convert to native CPU endianness when filling the structure. Also fix firmware validation checks and misspelled field in gen5_bl_metadata_row_params. Reported-by: kbuild test robot <[email protected]> Reviewed-by: Dudley Du <[email protected]> Tested-by: Dudley Du <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-19Input: synaptics - adjust min/max for Lenovo ThinkPad X1 Carbon 2ndPeter Hutterer1-3/+4
LEN0037 found in the Lenovo ThinkPad X1 Carbon 2nd (2014 model) Cc: [email protected] Reported-and-tested-by: Bjoern Olausson <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-19Merge branch 'for-linus' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: uinput - fix ioctl nr overflow for UI_GET_SYSNAME/VERSION Input: I8042 - add Acer Aspire 7738 to the nomux list Input: elantech - support new ICs types for version 4 Input: i8042 - reset keyboard to fix Elantech touchpad detection MAINTAINERS: remove Dmitry Torokhov's alternate address
2015-01-18Input: cyapa - add acpi device id supportDudley Du1-0/+11
Add acpi device tree support. acpi device id "CYAP0000" is for old gen3 trackpad devices. acpi device id "CYAP0001" is for new gen5 trackpad devices. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen5 trackpad force re-calibrate function supportDudley Du1-0/+65
Add force re-calibrate function support for gen5 trackpad device, it can be used through sysfs calibrate interface. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen5 trackpad read baseline supportDudley Du2-0/+642
Add read baseline function support for gen5 trackpad device, it can be used through sysfs baseline interface. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen5 trackpad firmware update supportDudley Du2-0/+392
Add firmware image update support for gen5 trackpad device, it can be used through sysfs update_fw interface. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen3 trackpad force re-calibrate supportDudley Du1-0/+59
Add force re-calibrate function support for gen3 trackpad device, it can be used through sysfs calibrate interface. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen3 trackpad read baseline supportDudley Du1-0/+72
Add read baseline function supported for gen3 trackpad device, it can be used through sysfs baseline interface. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen3 trackpad device firmware update supportDudley Du1-0/+309
Add support for firmware image update for gen3 trackpad devices; the firmware update is initiated by writing to update_fw sysfs attribute. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add sysfs interfaces support in the cyapa driverDudley Du1-0/+310
Introduce control interfaces that are commonly used in pre- and after production, for trackpad device state checking, managing and firmware image updating. These interfaces include mode, firmware_version and product_id interfaces for reading firmware version and trackpad device product id values, and update_fw interface to command firmware image update process. There are also baseline and calibrate interfaces for reading and checking trackpad device's sensors states. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add runtime power management supportDudley Du2-1/+189
This change implements runtime PM support in the driver and adds runtime_suspend_scanrate_ms power management interface in device's power group, so users or applications can control the runtime power management strategy of trackpad device according to their requirements. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add power management interfaces support for the deviceDudley Du1-0/+136
Add suspend_scanrate_ms power management interfaces in device's power group, so users or applications can control the power management strategy of trackpad device according to their requirements. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-01-18Input: cyapa - add gen5 trackpad device basic functions supportDudley Du4-1/+1693
This change adds support for Gen5 Cypress trackpads. The driver detects generation of the device at probe time and automatically selects appropriate protocol. Signed-off-by: Dudley Du <[email protected]> Tested-by: Jeremiah Mahler <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>