示例#1
0
static  int tpd_up(tinno_ts_data *ts, int x, int y, int pressure, int trackID) 
{
	if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) {   
		CTP_DBG("x=%03d, y=%03d, ID=%03d", x, y, trackID);
		input_report_abs(tpd->dev, ABS_PRESSURE, 0);
		input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0);
		input_report_key(tpd->dev, BTN_TOUCH, 0);
		input_report_abs(tpd->dev, ABS_MT_POSITION_X, x);
		input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y);
#ifdef FTS_SUPPORT_TRACK_ID
		input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID);
#endif
		input_report_abs(tpd->dev, ABS_MT_WIDTH_MAJOR, 0);
		input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0);// This must be placed at the last one.
		input_mt_sync(tpd->dev);
	}else{//Android 4.0 don't need to report these up events.
		int i, have_down_cnt = 0;
		for ( i=0; i < TINNO_TOUCH_TRACK_IDS; i++ ){
			if ( test_bit(i, &ts->fingers_flag) ){
				++have_down_cnt;
			}
		}
		if ( have_down_cnt < 2 ){
			input_mt_sync(tpd->dev);
		}
		CTP_DBG("x=%03d, y=%03d, ID=%03d, have_down=%d", x, y, trackID, have_down_cnt);
	}

	__clear_bit(trackID, &ts->fingers_flag);
	TPD_UP_DEBUG_TRACK(x,y);
	if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) {   
		tpd_button(x, y, 0); 
	}   		 
	return 0;
 }
示例#2
0
static  int tpd_up(tinno_ts_data *ts, int x, int y, int pressure, int trackID) 
{
	if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) {   
		CTP_DBG("x=%03d, y=%03d, ID=%03d", x, y, trackID);
		input_report_abs(tpd->dev, ABS_PRESSURE, 0);
		input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0);
		input_report_key(tpd->dev, BTN_TOUCH, 0);
		input_report_abs(tpd->dev, ABS_MT_POSITION_X, x);
		input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y);
#ifdef FTS_SUPPORT_TRACK_ID
		input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, trackID);
#endif
		input_report_abs(tpd->dev, ABS_MT_WIDTH_MAJOR, 0);
		input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0);// This must be placed at the last one.
		input_mt_sync(tpd->dev);
	}else{//Android 4.0 don't need to report these up events.
		int i, have_down_cnt = 0;
		for ( i=0; i < TINNO_TOUCH_TRACK_IDS; i++ ){
			if ( test_bit(i, &ts->fingers_flag) ){
				++have_down_cnt;
			}
		}
		if ( have_down_cnt < 2 ){
			input_mt_sync(tpd->dev);
		}
		CTP_DBG("x=%03d, y=%03d, ID=%03d, have_down=%d", x, y, trackID, have_down_cnt);
	}

	__clear_bit(trackID, &ts->fingers_flag);

#ifdef CONFIG_TOUCHSCREEN_SWEEP2WAKE
s2w_st_flag = 0;
				if (sweep2wake > 0) {
					//printk("[sweep2wake]:line : %d | func : %s\n", __LINE__, __func__);
					//printk("[SWEEP2WAKE]: resetin s2w param\n");
					//printk("[sweep2wake]:line : %d | func : %s\n", __LINE__, __func__);
					exec_count = true;
					barrier[0] = false;
					barrier[1] = false;
					scr_on_touch = false;
					tripoff = 0;
					tripon = 0;
					triptime = 0;
				}
				if (doubletap2wake && scr_suspended) {
printk("[SWEEP2WAKE]: detecting d2w\n");
					doubletap2wake_func(x, y, jiffies);
				}
#endif

        TPD_UP_DEBUG_TRACK(x,y);
        if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) {   
            tpd_button(x, y, 0); 
        }     
        
        return 0;
 }
示例#3
0
int tpd_up(int raw_x, int raw_y, int x, int y) {
        input_report_abs(tpd->dev, ABS_PRESSURE, 0);
        input_report_key(tpd->dev, BTN_TOUCH, 0);
        input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0);
        input_report_abs(tpd->dev, ABS_MT_POSITION_X, x);
        input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y);
        TPD_DEBUG("U[%4d %4d %4d] ", x, y, 0);
        input_mt_sync(tpd->dev);
        TPD_UP_DEBUG_TRACK(x,y);
        TPD_EM_PRINT(raw_x, raw_y, x, y, 0, 0);
        return 1;
}
static int tpd_up(int raw_x, int raw_y, int x, int y,int *count) {
    if(*count>0) {
        input_report_abs(tpd->dev, ABS_PRESSURE, 0);
        input_report_key(tpd->dev, BTN_TOUCH, 0);
        input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0);
        input_report_abs(tpd->dev, ABS_MT_POSITION_X, x);
        input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y);
        //printk("U[%4d %4d %4d] ", x, y, 0);
        input_mt_sync(tpd->dev);
        TPD_UP_DEBUG_TRACK(x,y);
        TPD_EM_PRINT(raw_x, raw_y, x, y, 0, 0);
        (*count)--;
        return 1;
    } return 0;
}