?????????AD??????ж?????У????????????count??????count?????????????????AD????????????????????????β???????????β?????????е???????????????????AD???????????????????AD??????ж????????У????????????count????4?????????????????????????X??Y????????AD???????е?AD???????????κ?????????????????????????????????ж?????????????????????????????AD??????????????????????????????????ζ????????touch_timer_fire


static void touch_timer_fire(unsigned long data)
{
     unsigned long data0;
     unsigned long data1;
       int updown;
     data0 = ioread32(base_addr+S3C2410_ADCDAT0);
     data1 = ioread32(base_addr+S3C2410_ADCDAT1);
      updown = (!(data0 & S3C2410_ADCDAT0_UPDOWN)) && (!(data1 & S3C2410_ADCDAT0_UPDOWN));
      if (updown) {  //????????????
             if (count != 0) { //count?????????????AD??????????????4??
                     long tmp;                                                                                        
                     tmp = xp;
                     xp = yp;
                     yp = tmp;  // X??Y?????????                                                                                  
           xp >>= 2; //????????????????Σ??????X??????
           yp >>= 2; //????????????????Σ??????Y??????
                    input_report_abs(dev?? ABS_X?? xp); //????X????
                    input_report_abs(dev?? ABS_Y?? yp); //????Y????
                    input_report_key(dev?? BTN_TOUCH?? 1); //???津?????
                    input_report_abs(dev?? ABS_PRESSURE?? 1);
                    input_sync(dev); //???
             }
             xp = 0;     //????
              yp = 0;
             count = 0;
             //???????????X??Y????
iowrite32(S3C2410_ADCTSC_PULL_UP_DISABLE | AUTOPST?? base_addr+S3C2410_ADCTSC);
//AD?????????λ??????????
             iowrite32(ioread32(base_addr+S3C2410_ADCCON) | S3C2410_ADCCON_ENABLE_START?? base_addr+S3C2410_ADCCON);
      } else {
             count = 0;
             input_report_key(dev?? BTN_TOUCH?? 0);
             input_report_abs(dev?? ABS_PRESSURE?? 0);
             input_sync(dev);
             iowrite32(WAIT4INT(0)?? base_addr+S3C2410_ADCTSC);
              if (OwnADC) {
                     OwnADC = 0;
                     up(&ADC_LOCK);
              }
      }
}


????????????????£???????X??Y???????????????????X35LCD????240*320?????????????“X??Y???”????????????X??Y????????????????????????????????????????????С?

??????????η???????????touch_timer_fire????????????????input??????????????????????????????????????AD?????????????????????AD?????????????δ?????????????????????????????AD???????????????????????????????????AD???????????????AD??????ж??????????????AD????????????????Σ???????????????????????ж???????????????????????????????????????????????????£???????θ?????????touch_timer_fire


static void touch_timer_fire(unsigned long data)
{
     unsigned long data0;
     unsigned long data1;
       int updown;
     data0 = ioread32(base_addr+S3C2410_ADCDAT0);  //???X????
     data1 = ioread32(base_addr+S3C2410_ADCDAT1);  //???Y????
      updown = (!(data0 & S3C2410_ADCDAT0_UPDOWN)) && (!(data1 & S3C2410_ADCDAT0_UPDOWN)); //????????????£????????updowm=1
      if (updown) {
             if (count != 0) {
                     long tmp;                                                                                        
                     tmp = xp;
                     xp = yp;
                     yp = tmp;                                                                                        
           xp >>= 2;
           yp >>= 2;
                    input_report_abs(dev?? ABS_X?? xp);
                    input_report_abs(dev?? ABS_Y?? yp);
                    input_report_key(dev?? BTN_TOUCH?? 1);
                    input_report_abs(dev?? ABS_PRESSURE?? 1);
                    input_sync(dev);
             }
             xp = 0;    
             yp = 0;
             count = 0;
             iowrite32(S3C2410_ADCTSC_PULL_UP_DISABLE | AUTOPST?? base_addr+S3C2410_ADCTSC);
             iowrite32(ioread32(base_addr+S3C2410_ADCCON) | S3C2410_ADCCON_ENABLE_START?? base_addr+S3C2410_ADCCON);
      } else { //??б?????
             count = 0;        //?????count?0????????AD????????
             input_report_key(dev?? BTN_TOUCH?? 0);  //??input????????δ????
             input_report_abs(dev?? ABS_PRESSURE?? 0); //?????????????
             input_sync(dev);
             iowrite32(WAIT4INT(0)?? base_addr+S3C2410_ADCTSC); //????????ж?
              if (OwnADC) { //OwnADC??????????????????1
                     OwnADC = 0;              //????????0???????????
                     up(&ADC_LOCK); //?????
              }
      }
}