Lines Matching refs:msgs
224 static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) in i2c_xfer() argument
234 __func__, num, msgs[i].addr, msgs[i].len); in i2c_xfer()
236 if (msgs[i].flags & I2C_M_RD) { in i2c_xfer()
238 retval = i2c_readbytes(i2c_adap, &msgs[i], 0); in i2c_xfer()
239 } else if (i + 1 < num && (msgs[i + 1].flags & I2C_M_RD) && in i2c_xfer()
240 msgs[i].addr == msgs[i + 1].addr) { in i2c_xfer()
242 retval = i2c_sendbytes(i2c_adap, &msgs[i], in i2c_xfer()
243 msgs[i + 1].len); in i2c_xfer()
248 retval = i2c_readbytes(i2c_adap, &msgs[i], 1); in i2c_xfer()
251 retval = i2c_sendbytes(i2c_adap, &msgs[i], 0); in i2c_xfer()
351 struct i2c_msg msgs[2] = { in cx25821_i2c_read() local
367 msgs[0].addr = 0x44; in cx25821_i2c_read()
368 msgs[1].addr = 0x44; in cx25821_i2c_read()
370 i2c_xfer(client->adapter, msgs, 2); in cx25821_i2c_read()
384 struct i2c_msg msgs[1] = { in cx25821_i2c_write() local
400 msgs[0].addr = 0x44; in cx25821_i2c_write()
402 retval = i2c_xfer(client->adapter, msgs, 1); in cx25821_i2c_write()