return -EIO;
}
- gpio_direction_output(TOUCH_RESET_PIN, 0);
+ gpio_direction_output(TOUCH_RESET_PIN, 1);
+ gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
+ mdelay(50);
gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
mdelay(50);
gpio_direction_input(TOUCH_INT_PIN);
return -ENOMEM;\r
}\r
\r
- while(retry < 5)\r
- {\r
- ret=ft5306_set_regs(client,FT5X0X_REG_PMODE, buf_test,1);\r
- if(ret > 0)break;\r
- retry++;\r
- }\r
- if(ret <= 0)\r
- {\r
- FTprintk("FT5306 I2C TEST ERROR!\n");\r
- err = -ENODEV;\r
- goto exit_i2c_test_fail;\r
- }\r
+ while(retry < 5) \r
+ { \r
+ ret = ft5306_set_regs(client,FT5X0X_REG_PMODE, buf_test, 1);\r
+ if(ret > 0) \r
+ break;\r
+ retry++;\r
+\r
+ printk("FT5306 I2C TEST FAILED, retry = %d, ret = %d, will again...\n", retry, ret);\r
+\r
+ if (pdata->exit_platform_hw) \r
+ pdata->exit_platform_hw();\r
+ if (pdata->init_platform_hw) \r
+ pdata->init_platform_hw();\r
+ } \r
+ printk("FT5306 I2C TEST OK, retry = %d, ret = %d\n", retry, ret);\r
+\r
+ if(ret <= 0)\r
+ { \r
+ printk("FT5306 I2C TEST ERROR! retry = %d, ret = %d\n", retry, ret);\r
+ err = -ENODEV;\r
+ goto exit_i2c_test_fail;\r
+ }\r
\r
input_dev = input_allocate_device();\r
if (!input_dev) {\r
err = -ENOMEM;\r
- FTprintk("failed to allocate input device\n");\r
+ printk("failed to allocate input device\n");\r
goto exit_input_dev_alloc_failed;\r
}\r
ft5x0x_ts->client = this_client = client;\r
input_dev->name = "ft5x0x_ts-touchscreen"; //dev_name(&client->dev)\r
err = input_register_device(input_dev);\r
if (err) {\r
- FTprintk("ft5306_ts_probe: failed to register input device: \n");\r
+ printk("ft5306_ts_probe: failed to register input device: \n");\r
goto exit_input_register_device_failed;\r
}\r
\r