diff options
author | KT Liao <kt.liao@emc.com.tw> | 2017-09-07 17:23:33 +0100 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-21 10:33:58 -0700 |
commit | b8af74cc4cf7a304ce8087fc60248ea037aad566 (patch) | |
tree | 1339181f3f0d02cbebf92e493c6c4d7a223b9d0e | |
parent | 0b2179c3179a31fde8678e9700477da2365c63ff (diff) | |
download | chrome-ec-b8af74cc4cf7a304ce8087fc60248ea037aad566.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>
-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 b39ef4fecc..7f69ada21b 100644 --- a/driver/touchpad_elan.c +++ b/driver/touchpad_elan.c @@ -214,8 +214,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); |