msg[0].scl_rate = 400*1000;
msg[0].udelay = 80;
- printk("%s:count=0x%x\n",__FUNCTION__,count);
+ DBG("%s:count=0x%x\n",__FUNCTION__,count);
// before sending data to touch device, we need to check whether the device is working or not
if(g_ts->valid_i2c_register == 0){
return -1;
}
- printk("%s:cmd=0x%x\n",__FUNCTION__,cmd);
+ DBG("%s:cmd=0x%x\n",__FUNCTION__,cmd);
return 0;
}
{
//DBG("%s:(%d/%d)\n",__FUNCTION__,*x, *y);
+ #ifndef CONFIG_MACH_RK29_TD8801_V2
if((*x< ts->x_min) || (*x > ts->x_max))
return -1;
if((*y< ts->y_min) || (*y > ts->y_max))
return -1;
+ #endif
/*android do not support min and max value*/
if(*x == ts->x_min)
msg[0].flags = ts->client->flags;
msg[0].len = 1;
msg[0].buf = &start_reg;
- msg[0].scl_rate = 400*1000;
- msg[0].udelay = 250;
+ msg[0].scl_rate = 200*1000;
+ msg[0].udelay = 200;
msg[1].addr = ts->client->addr;
msg[1].flags = ts->client->flags | I2C_M_RD;
msg[1].len = 9;
msg[1].buf = buf;
- msg[1].scl_rate = 400*1000;
+ msg[1].scl_rate = 200*1000;
msg[1].udelay = 0;
ret = i2c_transfer(ts->client->adapter, msg, 2);
x = g_x[i];
y = g_y[i];
}
-
+ #ifdef CONFIG_MACH_RK29_TD8801_V2
+ if( y >=80 ) y-=80;
+ if( x >= 50 ) x-=50;
+ #endif
g_x[i] = x;
g_y[i] = y;
input_event(ts->input_dev, EV_ABS, ABS_MT_TRACKING_ID, i);
if(syn_flag)
input_sync(ts->input_dev);
out:
-#if 1
+#if 0
if(ts->pendown)
{
schedule_delayed_work(&ts->work, msecs_to_jiffies(12));