aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elantech.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-07Input: elantech - add special check for fw_version 0x470f01 touchpadDuson Lin1-0/+1
It is no need to check the packet[0] for sanity check when doing elantech_packet_check_v4() function for fw_version = 0x470f01 touchpad. Signed-off by: Duson Lin <dusonlin@emc.com.tw> Reviewed-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-04-06Input: elantech - fix absolute mode setting on some ASUS laptopsUlrik De Bie1-0/+1
On ASUS TP500LN and X750JN, the touchpad absolute mode is reset each time set_rate is done. In order to fix this, we will verify the firmware version, and if it matches the one in those laptops, the set_rate function is overloaded with a function elantech_set_rate_restore_reg_07 that performs the set_rate with the original function, followed by a restore of reg_07 (the register that sets the absolute mode on elantech v4 hardware). Also the ASUS TP500LN and X750JN firmware version, capabilities, and button constellation is added to elantech.c Cc: stable@vger.kernel.org Reported-and-tested-by: George Moutsopoulos <gmoutso@yahoo.co.uk> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-26Input: elantech - add support for trackpoint found on some v3 modelsUlrik De Bie1-0/+3
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-05-05Input: elantech - fix touchpad initialization on Gigabyte U2442Hans de Goede1-0/+1
The hw_version 3 Elantech touchpad on the Gigabyte U2442 does not accept 0x0b as initialization value for r10, this stand-alone version of the driver: http://planet76.com/drivers/elantech/psmouse-elantech-v6.tar.bz2 Uses 0x03 which does work, so this means not setting bit 3 of r10 which sets: "Enable Real H/W Resolution In Absolute mode" Which will result in half the x and y resolution we get with that bit set, so simply not setting it everywhere is not a solution. We've been unable to find a way to identify touchpads where setting the bit will fail, so this patch uses a dmi based blacklist for this. https://bugzilla.kernel.org/show_bug.cgi?id=61151 Cc: stable@vger.kernel.org Reported-by: Philipp Wolfer <ph.wolfer@gmail.com> Tested-by: Philipp Wolfer <ph.wolfer@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-24Input: elantech - fix packet check for v3 and v4 hardwareMatteo Delfino1-0/+1
The signatures of v3 and v4 packets change depending on the value of a hardware flag called 'crc_enabled'. The packet type detection must change accordingly. This patch also restores a consistency check for v4 packets inadvertently removed by commit: 9eebed7de660c0b5ab129a9de4f89d20b60de68c Input: elantech - fix for newer hardware versions (v7) A note about the naming convention: v3 hardware is associated with IC body v5 while v4 hardware is associated with IC body v6 and v7. The above commit refers to IC body v7, not to v7 hardware. Tested on Samsung NP730U3E (fw = 0x675f05, ICv7, crc_enabled = 1) Tested-by: Giovanni Frigione <gio.frigione@gmail.com> Signed-off-by: Matteo Delfino <kendatsuba@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2011-11-20Input: elantech - add resolution query support for v4 hardwareJJ Ding1-0/+1
It turns out that v4's firmware provides a command so we can query the resolution. Let's use it. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-20Input: elantech - add support for elantech fast commandJJ Ding1-0/+1
Starting with v3 hardware, the firmware supports this shorter elantech_send_cmd. Teach the driver to use it. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20Input: elantech - better support all those v2 variantsJJ Ding1-0/+1
V2 hardware has many variants. This patch adddresses two issues: - some model also has debounce packets, but with a different signature than v3. Now we just check debounce for all v2 hardware. - due to different scanning methods the hardware uses, x and y ranges have to be calculated differently. And for some specific versions, we can just see them as custom-made, so set {x, y} the same values as Windows driver does. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Tested-by: Richard Schütz <r.schtz@t-online.de> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-09Input: elantech - add v4 hardware supportJJ Ding1-3/+26
v4 hardware is a true multitouch capable touchpad (up to 5 fingers). The packet format is quite complex, please see protocol document for reference. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-09Input: elantech - add v3 hardware supportJJ Ding1-0/+12
v3 hardware's packet format is almost identical to v2 (one/three finger touch), except when sensing two finger touch, the hardware sends 12 bytes of data. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Acked-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-09Input: elantech - remove ETP_EDGE_FUZZ_V2JJ Ding1-9/+6
Don't try to be too clever and remove ETP_EDGE_FUZZ_V2. X, Y ranges should be just the raw resolution of the device. Otherwise, they can cause underflow on the Y axis. Suggested-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Acked-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-09Input: elantech - use firmware provided x, y rangesJJ Ding1-1/+2
With newer hardware, the touchpad provides range info. Let's use it. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Acked-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-09Input: elantech - get rid of ETP_2FT_* in elantech.hJJ Ding1-11/+0
For two finger touches the coordinate of each finger gets reported separately but with reduced resolution. With this change, we now have the same range for ST and MT data and scale MT data because it has lower resolution to match ST. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Acked-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - export pressure and width when supportedÉric Piel1-0/+6
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>
2010-08-05Input: elantech - discard the first 2 positions on some firmwaresÉric Piel1-3/+4
According to the Dell/Ubuntu driver, what was previously observed as "jumpy cursor" corresponds to the hardware sending incorrect data for the first two reports of a one touch finger. So let's use the same workaround as in the other driver. Also, detect another firmware version with the same behaviour, as in the other driver. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-13Input: elantech - use all 3 bytes when checking versionDmitry Torokhov1-3/+2
Apparently all 3 bytes returned by ETP_FW_VERSION_QUERY are significant and should be taken into account when matching hardware version/features. Tested-by: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-10Input: psmouse - use boolean typeDmitry Torokhov1-2/+2
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-18Input: elantech - provide a workaround for jumpy cursor on firmware 2.34Arjan Opmeer1-2/+3
It seems that Elantech touchpad firmware version 2.34 on the Hercules eCAFÉ suffers from a problem where bogus coordinates get reported at the beginning of a touch action. This causes the mouse cursor or the scrolled page to jump. Included patch provides a workaround that discards mouse packets that are likely to contain bogus coordinates. The workaround is activated when we detect touchpad with fimware version 2.34. Signed-off-by: Arjan Opmeer <arjan@opmeer.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-10-16Input: psmouse - add support for Elantech touchpadsArjan Opmeer1-0/+124
This is version 5 of the driver. Relative mode support has been dropped (users wishing to use touchpad in relative mode can use standard PS/2 protocol emulation done in hardware). The driver supports both original version of Elantech protocol and the newer one used by touchpads installed in EeePC. Signed-off-by: Arjan Opmeer <arjan@opmeer.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>