部分源码:
static int ft5x0x_read_reg(u8 addr, u8 *pdata)
{
int ret;
u8 buf[2] = {0};
buf[0] = addr;
struct i2c_msg msgs[] = {
{
.addr = this_client->addr,
.flags = 0,
.len = 1,
.buf = buf,
.scl_rate = 400*1000,
},
{
.addr = this_client->addr,
.flags = I2C_M_RD,
.len = 1,
.buf = buf,
.scl_rate = 400*1000,
},
};
//msleep(1);
ret = i2c_transfer(this_client->adapter, msgs, 2);
if (ret < 0)
pr_err("msg %s i2c read error33: %d\n", __func__, ret);
*pdata = buf[0];
return ret;
}
错误提示:
msg ft5x0x_read_reg i2c read error33: -11
问:
这是i2c地址配置不正确吗