summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-09-05 12:26:50 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-09-05 12:32:35 +0200
commit1122d0b545e1cc46c58e27ecda0349e844126685 (patch)
tree24cc1a652e84a17b3afd99fc1d68d3f1bba2687c
parent2f7b8f8db2dd099f24246a214026fae4cefbbeff (diff)
downloadlinux-1122d0b545e1cc46c58e27ecda0349e844126685.tar.gz
HID: logitech-wtp: read full status bits
The Contact Status field is two bits: 00 - no finger (released) 01 - touch 10 - hover 11 - reserved These constants are already defined, but unused. This patch does not have functional effects (as the status bit is only printed for debugging right now). Signed-off-by: Peter Wu <lekensteyn@gmail.com>
-rw-r--r--drivers/hid/hid-logitech-wtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-logitech-wtp.c b/drivers/hid/hid-logitech-wtp.c
index ae44232e6e17..a5d76589ff14 100644
--- a/drivers/hid/hid-logitech-wtp.c
+++ b/drivers/hid/hid-logitech-wtp.c
@@ -352,7 +352,7 @@ static int tprxy_parse_feature_event(struct wtp_data *wtp,
for (i = 0; i < TPRXY_SLOTS_PER_FRAME; ++i) {
u8 *raw = buf + (2 + i * 7);
- event->fingers[i].status = get_bit(raw[2], 6);
+ event->fingers[i].status = (raw[2] >> 6) & 3;
event->fingers[i].abs_x = make_u16(raw[0] & 0x3f, raw[1]);
event->fingers[i].abs_y = make_u16(raw[2] & 0x3f, raw[3]);
event->fingers[i].pressure = raw[5];