From: sakura Date: Wed, 8 Dec 2010 06:45:37 +0000 (+0800) Subject: fix multi-touch irq X-Git-Tag: firefly_0821_release~10978 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4dad9b4651751f209619098d4fc01fb0da5d85d8;p=firefly-linux-kernel-4.4.55.git fix multi-touch irq --- diff --git a/drivers/input/touchscreen/hannstar_p1003.c b/drivers/input/touchscreen/hannstar_p1003.c index 48e316eb834e..bb217ae69f9a 100755 --- a/drivers/input/touchscreen/hannstar_p1003.c +++ b/drivers/input/touchscreen/hannstar_p1003.c @@ -72,11 +72,12 @@ int p1003_get_pendown_state(void) static void p1003_report_event(struct ts_p1003 *ts,struct multitouch_event *tc) { struct input_dev *input = ts->input; - int i; + int i,pandown = 0; dev_dbg(&ts->client->dev, "UP\n"); for(i=0; ipoint_data[i].status >= 0){ + if(tc->point_data[i].status >= 0){ + pandown |= tc->point_data[i].status; input_report_abs(input, ABS_MT_TRACKING_ID, i); input_report_abs(input, ABS_MT_TOUCH_MAJOR, tc->point_data[i].status); input_report_abs(input, ABS_MT_WIDTH_MAJOR, 0); @@ -92,6 +93,7 @@ static void p1003_report_event(struct ts_p1003 *ts,struct multitouch_event *tc) } } + ts->pendown = pandown; input_sync(input); } static void p1003_report_single_event(struct ts_p1003 *ts,struct multitouch_event *tc) @@ -160,6 +162,7 @@ static void p1003_work(struct work_struct *work) if (ts->pendown) schedule_delayed_work(&ts->work, msecs_to_jiffies(10)); + else enable_irq(ts->irq); } @@ -167,7 +170,6 @@ static void p1003_work(struct work_struct *work) static irqreturn_t p1003_irq(int irq, void *handle) { struct ts_p1003 *ts = handle; - #if 1 if (!ts->get_pendown_state || likely(ts->get_pendown_state())) { disable_irq_nosync(ts->irq);