aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elan_i2c_i2c.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-22Input: elan_i2c - extend Flash-Write delayKT Liao1-1/+1
The original 20ms delay is only marginally enough delay after a block write operation during firmware update. Let's increase the delay to ensure that the controller finishes up storing the page to avoid failures in the firmware updates. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-08-18Input: elan_i2c - support touchpads with two physical buttonsKT Liao1-1/+12
Elan touchpads on Asus ROG G752xx series laptops have 2 physical buttons. Luckily we can query the touchpad to see if it is a clickpad variant and adjust the behavior accordingly. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Tested-by: Maxime Bellengé <maxime.bellenge@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-29Merge tag 'v4.12-rc3' into nextDmitry Torokhov1-14/+16
Sync with mainline to bring in changes in platform drovers dropping calls to sparse_keymap_free() so that we can remove it for good.
2017-05-25Input: elan_i2c - ignore signals when finishing updating firmwareKT Liao1-13/+8
Use wait_for_completion_timeout() instead of wait_for_completion_interruptible_timeout() to avoid stray signals ruining firmware update. Our timeout is only 300 msec so we are fine simply letting it expire in case device misbehaves. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-25Input: elan_i2c - clear INT before resetting controllerKT Liao1-1/+8
Some old touchpad FWs need to have interrupt cleared before issuing reset command after updating firmware. We clear interrupt by attempting to read full report from the controller, and discarding any data read. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-11Input: elan_i2c - add support for fetching chip type on newer hardwareKT Liao1-7/+64
Newer Elantech hardware requires different way of fetching chip type and version data. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-21Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFFDuson Lin1-2/+2
In order to support more projects in the future, we expand the maximum product_id value form 0xFF to 0xFFFF. Signed-off by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-06-08Input: elan_i2c - add support for multi IC type and iap formatDuson Lin1-1/+3
In order to support multiple IC types for i2c/smbus protocol, add get ic type command and use this data when checking firmware page count and signature address. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-04-20Input: elan_i2c - fix calculating number of x and y traces.Duson Lin1-2/+2
According to Elan's firmware engineers we should not be subtracting 1 form the raw number of x and y traces so that the pitch size is correct. For example, if the touchpad x resolution is 2800 and x trace number is 20, the pitch size of x should be 2800/20 = 140, not 2800/19 = 147.36. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-04-14Input: elan_i2c - adjust for newer firmware pressure reportingduson1-0/+23
Get pressure format flag from firmware to check if we need to normalize pressure data before reporting it. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-07Input: elan_i2c - return error code when resume failsDuson Lin1-1/+9
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 <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-23Input: elan_i2c - verify firmware signature applying itDuson Lin1-1/+0
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 <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-24Input: add driver for Elan I2C/SMbus touchpadDuson Lin1-0/+611
This driver supports Elan I2C/SMbus touchpads found in some laptops and also in many Chromebooks. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>