fix multi-touch irq
authorsakura <sakura@sakura-desktop.(none)>
Wed, 8 Dec 2010 06:45:37 +0000 (14:45 +0800)
committersakura <sakura@sakura-desktop.(none)>
Wed, 8 Dec 2010 06:45:37 +0000 (14:45 +0800)
drivers/input/touchscreen/hannstar_p1003.c

index 48e316eb834e63987227aefe75e767acb5319094..bb217ae69f9a3f28d233cff414183c2c429ecc51 100755 (executable)
@@ -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; i<MAX_SUPPORT_POINT;i++){                 
-        if(tc->point_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);