// Globel or static variables\r
// ****************************************************************************\r
static struct ts_driver g_driver;\r
-\r
+static int vtl_first_init_flag = 1;\r
struct ts_info g_ts = {\r
.driver = &g_driver,\r
.debug = DEBUG_ENABLE,\r
struct ts_info *ts; \r
unsigned char i;\r
ts =pg_ts;\r
-\r
DEBUG();\r
if(ts->config_info.ctp_used)\r
{\r
+ vtl_first_init_flag = 0;\r
disable_irq(ts->config_info.irq_number);\r
chip_enter_sleep_mode();\r
\r
//input_mt_report_slot_state(ts->driver->input_dev, MT_TOOL_FINGER, false);\r
}\r
input_sync(ts->driver->input_dev);\r
-\r
- enable_irq(ts->config_info.irq_number);\r
+ if(vtl_first_init_flag==0)\r
+ enable_irq(ts->config_info.irq_number);\r
}\r
return 0;\r
}\r
{\r
struct ts_info *ts; \r
ts =pg_ts;\r
-\r
DEBUG();\r
\r
vtl_ts_resume(ts->driver->client);\r
//ts->driver->early_suspend.suspend = vtl_ts_early_suspend;\r
//ts->driver->early_suspend.resume = vtl_ts_early_resume;\r
//register_early_suspend(&ts->driver->early_suspend);\r
- ts->tp.tp_resume = vtl_ts_early_resume;\r
- ts->tp.tp_suspend = vtl_ts_early_suspend;\r
- tp_register_fb(&ts->tp);\r
+ \r
\r
//#endif\r
\r
dev_err(dev, "Unable to request irq for device %s.\n", DRIVER_NAME);\r
goto ERR_IRQ_REQ;\r
}\r
-\r
+ //disable_irq(pg_ts->config_info.irq_number);\r
ts->config_info.ctp_used =1;\r
+ \r
+ ts->tp.tp_resume = vtl_ts_early_resume;\r
+ ts->tp.tp_suspend = vtl_ts_early_suspend;\r
+ tp_register_fb(&ts->tp);\r
+ \r
while (!kthread_should_stop())//while(1)\r
{\r
//set_current_state(TASK_INTERRUPTIBLE); \r
// Enable ts interrupt\r
enable_irq(pg_ts->config_info.irq_number);\r
}\r
- disable_irq(pg_ts->config_info.irq_number);\r
+ \r
printk("vtl_ts_Kthread exit,%s(%d)\n",__func__,__LINE__);\r
return 0;\r
\r