The atmel_mxt_ts T9 data contains orientation information in its 'vector' field. Parse and debug print its contents, although its value isn't actually used yet. Signed-off-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx> Reviewed-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> Acked-by: Nick Dyer <nick.dyer@xxxxxxxxxxx> --- drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 40dd3e6..be1e2ec 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -489,6 +489,7 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message) int area; int amplitude; int id; + int vector1, vector2; id = message->reportid - data->T9_reportid_min; @@ -503,8 +504,12 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message) area = message->message[4]; amplitude = message->message[5]; + /* The two vector components are 4-bit signed ints (2s complement) */ + vector1 = (signed)((signed char)message->message[6]) >> 4; + vector2 = (signed)((signed char)(message->message[6] << 4)) >> 4; + dev_dbg(dev, - "[%d] %c%c%c%c%c%c%c%c x: %d y: %d area: %d amp: %d\n", + "[%d] %c%c%c%c%c%c%c%c x: %d y: %d area: %d amp: %d vector: [%d,%d]\n", id, (status & MXT_DETECT) ? 'D' : '.', (status & MXT_PRESS) ? 'P' : '.', @@ -514,7 +519,7 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message) (status & MXT_AMP) ? 'A' : '.', (status & MXT_SUPPRESS) ? 'S' : '.', (status & MXT_UNGRIP) ? 'U' : '.', - x, y, area, amplitude); + x, y, area, amplitude, vector1, vector2); input_mt_slot(input_dev, id); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, @@ -525,6 +530,7 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message) input_report_abs(input_dev, ABS_MT_POSITION_Y, y); input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude); input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area); + /* TODO: Use vector to report ORIENTATION & TOUCH_MINOR */ } input_mt_report_pointer_emulation(input_dev, false); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html