mako: touch: fix the tool type to finger
The tool type checking for pen was incorrect.
Sometimes finger touch produces the same condition as PEN which is
width major and minor are all zero.
This wrong detection change the tracking ID, resulting in two finger
touch report even when single touch is used.
Fix the tool type to finger since mako will support only finger.
Change-Id: I4c7631b77fed677d27d430986d70407af3406aca
diff --git a/drivers/input/touchscreen/touch_synaptics.c b/drivers/input/touchscreen/touch_synaptics.c
index 459b9f8..4115890 100644
--- a/drivers/input/touchscreen/touch_synaptics.c
+++ b/drivers/input/touchscreen/touch_synaptics.c
@@ -161,7 +161,6 @@
(struct synaptics_ts_data*)get_touch_handle(client);
u32 finger_status=0;
- u8 finger_index=0;
u8 id=0;
u8 cnt;
@@ -248,13 +247,13 @@
data[id].y_position = TS_SNTS_GET_Y_POSITION(ts->ts_data.finger.finger_reg[id][REG_Y_POSITION], ts->ts_data.finger.finger_reg[id][REG_YX_POSITION]);
data[id].width_major = TS_SNTS_GET_WIDTH_MAJOR(ts->ts_data.finger.finger_reg[id][REG_WY_WX]);
data[id].width_minor = TS_SNTS_GET_WIDTH_MINOR(ts->ts_data.finger.finger_reg[id][REG_WY_WX]);
- data[id].tool_type = (data[id].width_major == 0 && data[id].width_minor == 0) ? MT_TOOL_PEN : MT_TOOL_FINGER;
+ data[id].tool_type = MT_TOOL_FINGER;
data[id].width_orientation = TS_SNTS_GET_ORIENTATION(ts->ts_data.finger.finger_reg[id][REG_WY_WX]);
data[id].pressure = TS_SNTS_GET_PRESSURE(ts->ts_data.finger.finger_reg[id][REG_Z]);
if (unlikely(touch_debug_mask & DEBUG_GET_DATA))
TOUCH_INFO_MSG("[%d] pos(%4d,%4d) w_m[%2d] w_n[%2d] w_o[%2d] p[%2d]\n",
- finger_index,
+ id,
data[id].x_position,
data[id].y_position,
data[id].width_major,