numbers of i2c_msgs to transfer: 2: succeed, otherwise: failed ***/s32gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len){structi2c_msgmsgs[2];s32 ret=-1; s32 retries =0;GTP_DEBUG_FUNC(); msgs[0].flags = !I2C_M_RD; msgs[0].addr = client->addr; msgs[0].len = G...
ret = gtp_i2c_test(client); ret = gtp_read_version(client, &version_info); //2.触摸屏初始化调用(每个触摸屏都会由厂商提供初始化代码) ret = gtp_init_panel(ts); properties_kobj = kobject_create_and_add("board_properties", NULL); ...
err = gt1x_i2c_read(addr, &data[CMD_HEAD_LENGTH], data_length);if(!err) { err = copy_to_user(&((u8 __user *) arg)[CMD_HEAD_LENGTH], &data[CMD_HEAD_LENGTH], data_length);if(err) {GTP_ERROR("ERROR when copy to user.[addr: %04x], [read length:%d]", addr, data_length...
tool_i2c_read = tool_i2c_read_with_extra; tool_i2c_write = tool_i2c_write_with_extra;GTP_INFO("I2C function: register with pre and end cmd!"); }else{ tool_i2c_read = tool_i2c_read_no_extra; tool_i2c_write = tool_i2c_write_no_extra;GTP_INFO("I2C function: register without pre ...