aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elan_i2c_smbus.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-18Input: elan_i2c - support touchpads with two physical buttonsKT Liao1-1/+3
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-11Input: elan_i2c - add support for fetching chip type on newer hardwareKT Liao1-1/+8
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>
2016-10-03Input: elan_i2c - fix return tests of i2c_smbus_read_block_data()Benjamin Tissoires1-8/+12
i2c_smbus_read_block_data() returns negative errno else the number of data bytes in the slave's response. Checking for error not null means the function always fails if the device answers properly. So given that we read 3 bytes and access those, better check that we actually read those 3 bytes. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> 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-2/+4
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/+8
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-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 <linux@rasmusvillemoes.dk> 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/+514
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>