diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2012-06-28 09:08:18 -0400 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2012-06-29 09:58:05 -0400 |
commit | b2e459b81b33ca17052de03b1315d8511d769507 (patch) | |
tree | 18e7132763826950396b65cf19c096d5e5ca034d /drivers/input/touchscreen | |
parent | fba5bc313c44acfb3561da69526cbc1a0029cdd8 (diff) |
Input: atmel_mxt_ts - add detail to touchevent debug message
Update the debug message:
* print inidividual status bits
* print the pressure value
* use '%u' for unsigned quantities
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index c37584de49ca..d6b64a0fed45 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -195,6 +195,7 @@ | |||
195 | #define MXT_BOOT_STATUS_MASK 0x3f | 195 | #define MXT_BOOT_STATUS_MASK 0x3f |
196 | 196 | ||
197 | /* Touch status */ | 197 | /* Touch status */ |
198 | #define MXT_UNGRIP (1 << 0) | ||
198 | #define MXT_SUPPRESS (1 << 1) | 199 | #define MXT_SUPPRESS (1 << 1) |
199 | #define MXT_AMP (1 << 2) | 200 | #define MXT_AMP (1 << 2) |
200 | #define MXT_VECTOR (1 << 3) | 201 | #define MXT_VECTOR (1 << 3) |
@@ -531,9 +532,19 @@ static void mxt_input_touchevent(struct mxt_data *data, | |||
531 | area = message->message[4]; | 532 | area = message->message[4]; |
532 | pressure = message->message[5]; | 533 | pressure = message->message[5]; |
533 | 534 | ||
534 | dev_dbg(dev, "[%d] %s x: %d, y: %d, area: %d\n", id, | 535 | dev_dbg(dev, |
535 | status & MXT_MOVE ? "moved" : "pressed", | 536 | "[%u] %c%c%c%c%c%c%c%c x: %5u y: %5u area: %3u amp: %3u\n", |
536 | x, y, area); | 537 | id, |
538 | (status & MXT_DETECT) ? 'D' : '.', | ||
539 | (status & MXT_PRESS) ? 'P' : '.', | ||
540 | (status & MXT_RELEASE) ? 'R' : '.', | ||
541 | (status & MXT_MOVE) ? 'M' : '.', | ||
542 | (status & MXT_VECTOR) ? 'V' : '.', | ||
543 | (status & MXT_AMP) ? 'A' : '.', | ||
544 | (status & MXT_SUPPRESS) ? 'S' : '.', | ||
545 | (status & MXT_UNGRIP) ? 'U' : '.', | ||
546 | x, y, area, pressure); | ||
547 | |||
537 | input_mt_slot(input_dev, id); | 548 | input_mt_slot(input_dev, id); |
538 | input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, | 549 | input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, |
539 | status & MXT_DETECT); | 550 | status & MXT_DETECT); |