=== modified file 'drivers/input/touchscreen/ektf3k.c'
@@ -910,6 +910,9 @@
for(i = 0; i < FINGER_NUM; i++){
active = fbits & 0x1;
if(active || mTouchStatus[i]){
+ if (active != mTouchStatus[i]) {
+ input_report_key(idev, BTN_TOUCH, active);
+ }
input_mt_slot(ts->input_dev, i);
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, active);
if(active){
@@ -923,6 +926,11 @@
input_report_abs(idev, ABS_MT_POSITION_X, y);
input_report_abs(idev, ABS_MT_POSITION_Y, x);
if(unlikely(gPrint_point)) touch_debug(DEBUG_INFO, "[elan] finger id=%d X=%d y=%d size=%d pressure=%d\n", i, x, y, touch_size, pressure_size);
+ if (i == 0) {
+ input_report_abs(idev, ABS_PRESSURE, pressure_size);
+ input_report_abs(idev, ABS_X, y);
+ input_report_abs(idev, ABS_Y, x);
+ }
}
}
mTouchStatus[i] = active;
@@ -956,10 +964,12 @@
if ( (num < 3) || ((checksum & 0x00ff) == buf[34])) {
fbits = buf[2] & 0x30;
fbits = (fbits << 4) | buf[1];
- //input_report_key(idev, BTN_TOUCH, 1);
for(i = 0; i < FINGER_NUM; i++){
active = fbits & 0x1;
if(active || mTouchStatus[i]){
+ if (active != mTouchStatus[i]) {
+ input_report_key(idev, BTN_TOUCH, active);
+ }
input_mt_slot(ts->input_dev, i);
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, active);
if(active){
@@ -973,6 +983,11 @@
input_report_abs(idev, ABS_MT_POSITION_X, y);
input_report_abs(idev, ABS_MT_POSITION_Y, x);
if(unlikely(gPrint_point)) touch_debug(DEBUG_INFO, "[elan] finger id=%d X=%d y=%d size=%d pressure=%d\n", i, x, y, touch_size, pressure_size);
+ if (i == 0) {
+ input_report_abs(idev, ABS_PRESSURE, pressure_size);
+ input_report_abs(idev, ABS_X, y);
+ input_report_abs(idev, ABS_Y, x);
+ }
}
}
mTouchStatus[i] = active;
@@ -1505,11 +1520,15 @@
}
ts->input_dev->name = "elan-touchscreen";
- //set_bit(BTN_TOUCH, ts->input_dev->keybit);
+ set_bit(BTN_TOUCH, ts->input_dev->keybit);
ts->abs_x_max = pdata->abs_x_max;
ts->abs_y_max = pdata->abs_y_max;
touch_debug(DEBUG_INFO, "[Elan] Max X=%d, Max Y=%d\n", ts->abs_x_max, ts->abs_y_max);
+ input_set_abs_params(ts->input_dev, ABS_X, pdata->abs_y_min, pdata->abs_y_max, 0, 0); // for 800 * 1280
+ input_set_abs_params(ts->input_dev, ABS_Y, pdata->abs_x_min, pdata->abs_x_max, 0, 0); // for 800 * 1280
+ input_set_abs_params(ts->input_dev, ABS_PRESSURE, 0, MAX_FINGER_PRESSURE, 0, 0);
+
input_mt_init_slots(ts->input_dev, FINGER_NUM);
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X, pdata->abs_y_min, pdata->abs_y_max, 0, 0); // for 800 * 1280
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y, pdata->abs_x_min, pdata->abs_x_max, 0, 0);// for 800 * 1280