diff options
author | KT Liao <kt.liao@emc.com.tw> | 2017-09-07 17:23:33 +0100 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-08-22 00:03:02 +0000 |
commit | 54e976e84087c92999804d4da2bffab71a4d6b5c (patch) | |
tree | 475e05fb2357a2205693c4caf386ec95a1828369 | |
parent | 6d4235d89af8eac335a6349fef2c043a57b86f21 (diff) | |
download | chrome-ec-54e976e84087c92999804d4da2bffab71a4d6b5c.tar.gz |
touchpad_elan: Fix the trace number accessing for width/hight property
Base on Elan I2C driver and Elan touchpad spec, the x trace number
of touching object is in the low nibble of byte. And y trace number
is in the high nibble.
This is a minor bug and difficult to find in operation.
I fix the byte accessing to make it right in palm detection
Signed-off-by: KT Liao <kt.liao@emc.com.tw>
BRANCH=poppy
BUG=None
TEST=Test hammer in EVTEST and check MAJOR/MINOR
Change-Id: I83e5e1f224eaf815914e7001234cdc1b1af22660
Reviewed-on: https://chromium-review.googlesource.com/659478
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
(cherry picked from commit b8af74cc4cf7a304ce8087fc60248ea037aad566)
Reviewed-on: https://chromium-review.googlesource.com/1183543
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
-rw-r--r-- | driver/touchpad_elan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c index d876c76fb9..9cc399ae6e 100644 --- a/driver/touchpad_elan.c +++ b/driver/touchpad_elan.c @@ -227,8 +227,8 @@ static int elan_tp_read_report(void) int valid = touch_info & (1 << (3+i)); if (valid) { - int width = (finger[3] & 0xf0) >> 4; - int height = finger[3] & 0x0f; + int width = finger[3] & 0x0f; + int height = (finger[3] & 0xf0) >> 4; int pressure = finger[4] + elan_tp_params.pressure_adj; pressure = DIV_ROUND_NEAREST(pressure * pressure_mult, pressure_div); |