Lines Matching refs:msgs
114 static void translate(struct pt3_i2cbuf *cbuf, struct i2c_msg *msgs, int num) in translate() argument
121 rd = !!(msgs[i].flags & I2C_M_RD); in translate()
123 put_byte_write(cbuf, msgs[i].addr << 1 | rd); in translate()
125 put_byte_read(cbuf, msgs[i].len); in translate()
127 for (j = 0; j < msgs[i].len; j++) in translate()
128 put_byte_write(cbuf, msgs[i].buf[j]); in translate()
202 pt3_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) in pt3_i2c_master_xfer() argument
213 if (msgs[i].flags & I2C_M_RECV_LEN) { in pt3_i2c_master_xfer()
220 translate(cbuf, msgs, num); in pt3_i2c_master_xfer()
229 if ((msgs[i].flags & I2C_M_RD) && msgs[i].len > 0) { in pt3_i2c_master_xfer()
230 memcpy_fromio(msgs[i].buf, p, msgs[i].len); in pt3_i2c_master_xfer()
231 p += msgs[i].len; in pt3_i2c_master_xfer()