Kernel->touch:fix gsl3680 power on cannot touch
This commit is contained in:
@ -1301,23 +1301,7 @@ static int gsl_ts_probe(struct i2c_client *client,
|
||||
printk("GSLX680 Enter %s\n", __func__);
|
||||
|
||||
//gslX680_init();
|
||||
while(timer > 0)
|
||||
{
|
||||
ret = i2c_master_recv(client,&buffer,1);
|
||||
if(ret >= 0)
|
||||
{
|
||||
printk("%s--%d, i2c_master_recv sucess\n", __func__, __LINE__);
|
||||
break;
|
||||
}
|
||||
timer--;
|
||||
msleep(100);
|
||||
}
|
||||
|
||||
if(ret < 0)
|
||||
{
|
||||
printk("%s--%d, i2c_master_recv fail\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
|
||||
dev_err(&client->dev, "I2C functionality not supported\n");
|
||||
@ -1357,12 +1341,31 @@ static int gsl_ts_probe(struct i2c_client *client,
|
||||
return -EIO;
|
||||
}
|
||||
gpio_direction_output(ts->rst_pin, 0);
|
||||
msleep(20);
|
||||
gpio_set_value(ts->rst_pin,GPIO_HIGH);
|
||||
msleep(20);
|
||||
} else {
|
||||
dev_info(&client->dev, "reset pin invalid\n");
|
||||
}
|
||||
gts = ts;
|
||||
msleep(500);
|
||||
while(timer > 0)
|
||||
{
|
||||
ret = i2c_master_recv(client,&buffer,1);
|
||||
if(ret >= 0)
|
||||
{
|
||||
printk("%s--%d, i2c_master_recv sucess\n", __func__, __LINE__);
|
||||
break;
|
||||
}
|
||||
timer--;
|
||||
msleep(100);
|
||||
}
|
||||
|
||||
if(ret < 0)
|
||||
{
|
||||
printk("%s--%d, i2c_master_recv fail\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
rc = gslX680_ts_init(client, ts);
|
||||
if (rc < 0) {
|
||||
|
||||
Reference in New Issue
Block a user