From: 黄涛 Date: Wed, 30 Nov 2011 11:41:47 +0000 (+0800) Subject: input: eeti_egalax_i2c: never report ABS_MT_TOUCH_MAJOR with 0 X-Git-Tag: firefly_0821_release~9733^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=668fce082e1ceaf3eb2881a502d9b53804f33ce9;p=firefly-linux-kernel-4.4.55.git input: eeti_egalax_i2c: never report ABS_MT_TOUCH_MAJOR with 0 --- diff --git a/drivers/input/touchscreen/eeti_egalax_i2c.c b/drivers/input/touchscreen/eeti_egalax_i2c.c index af0c5f0ed8e4..8177406c9373 100755 --- a/drivers/input/touchscreen/eeti_egalax_i2c.c +++ b/drivers/input/touchscreen/eeti_egalax_i2c.c @@ -371,21 +371,20 @@ static void ProcessReport(unsigned char *buf, int buflen) { for(i=0; i= 0) + if(PointBuf[i].Status > 0) { input_mt_slot(input_dev, i); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, true); input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, PointBuf[i].Status); input_report_abs(input_dev, ABS_MT_POSITION_X, PointBuf[i].X); input_report_abs(input_dev, ABS_MT_POSITION_Y, PointBuf[i].Y); - - if(PointBuf[i].Status == 0) - PointBuf[i].Status--; + PointBuf[i].Status = 0; } - else + else if (PointBuf[i].Status == 0) { input_mt_slot(input_dev, i); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, false); + PointBuf[i].Status = -1; } } input_sync(input_dev); @@ -505,10 +504,11 @@ static void egalax_i2c_wq(struct work_struct *work) input_report_abs(input_dev, ABS_MT_POSITION_Y, PointBuf[i].Y); PointBuf[i].Status = 0; } - else + else if (PointBuf[i].Status == 0) { input_mt_slot(input_dev, i); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, false); + PointBuf[i].Status = -1; } } input_sync(input_dev);