Commit b2e459b8 authored by Daniel Kurtz's avatar Daniel Kurtz Committed by Henrik Rydberg

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: default avatarDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
parent fba5bc31
...@@ -195,6 +195,7 @@ ...@@ -195,6 +195,7 @@
#define MXT_BOOT_STATUS_MASK 0x3f #define MXT_BOOT_STATUS_MASK 0x3f
/* Touch status */ /* Touch status */
#define MXT_UNGRIP (1 << 0)
#define MXT_SUPPRESS (1 << 1) #define MXT_SUPPRESS (1 << 1)
#define MXT_AMP (1 << 2) #define MXT_AMP (1 << 2)
#define MXT_VECTOR (1 << 3) #define MXT_VECTOR (1 << 3)
...@@ -531,9 +532,19 @@ static void mxt_input_touchevent(struct mxt_data *data, ...@@ -531,9 +532,19 @@ static void mxt_input_touchevent(struct mxt_data *data,
area = message->message[4]; area = message->message[4];
pressure = message->message[5]; pressure = message->message[5];
dev_dbg(dev, "[%d] %s x: %d, y: %d, area: %d\n", id, dev_dbg(dev,
status & MXT_MOVE ? "moved" : "pressed", "[%u] %c%c%c%c%c%c%c%c x: %5u y: %5u area: %3u amp: %3u\n",
x, y, area); id,
(status & MXT_DETECT) ? 'D' : '.',
(status & MXT_PRESS) ? 'P' : '.',
(status & MXT_RELEASE) ? 'R' : '.',
(status & MXT_MOVE) ? 'M' : '.',
(status & MXT_VECTOR) ? 'V' : '.',
(status & MXT_AMP) ? 'A' : '.',
(status & MXT_SUPPRESS) ? 'S' : '.',
(status & MXT_UNGRIP) ? 'U' : '.',
x, y, area, pressure);
input_mt_slot(input_dev, id); input_mt_slot(input_dev, id);
input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, input_mt_report_slot_state(input_dev, MT_TOOL_FINGER,
status & MXT_DETECT); status & MXT_DETECT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment