Lines Matching refs:msg
250 static int rzv2m_i2c_send(struct rzv2m_i2c_priv *priv, struct i2c_msg *msg, in rzv2m_i2c_send() argument
256 for (i = 0; i < msg->len; i++) { in rzv2m_i2c_send()
257 ret = rzv2m_i2c_write_with_ack(priv, msg->buf[i]); in rzv2m_i2c_send()
266 static int rzv2m_i2c_receive(struct rzv2m_i2c_priv *priv, struct i2c_msg *msg, in rzv2m_i2c_receive() argument
272 for (i = 0; i < msg->len; i++) { in rzv2m_i2c_receive()
273 ret = rzv2m_i2c_read_with_ack(priv, &msg->buf[i], in rzv2m_i2c_receive()
274 (msg->len - 1) == i); in rzv2m_i2c_receive()
284 struct i2c_msg *msg) in rzv2m_i2c_send_address() argument
289 if (msg->flags & I2C_M_TEN) { in rzv2m_i2c_send_address()
295 addr = 0xf0 | ((msg->addr & GENMASK(9, 8)) >> 7); in rzv2m_i2c_send_address()
296 addr |= !!(msg->flags & I2C_M_RD); in rzv2m_i2c_send_address()
303 ret = rzv2m_i2c_write_with_ack(priv, msg->addr & 0xff); in rzv2m_i2c_send_address()
306 addr = i2c_8bit_addr_from_msg(msg); in rzv2m_i2c_send_address()
325 struct i2c_msg *msg, int stop) in rzv2m_i2c_master_xfer_msg() argument
328 int ret, read = !!(msg->flags & I2C_M_RD); in rzv2m_i2c_master_xfer_msg()
333 ret = rzv2m_i2c_send_address(priv, msg); in rzv2m_i2c_master_xfer_msg()
336 ret = rzv2m_i2c_receive(priv, msg, &count); in rzv2m_i2c_master_xfer_msg()
338 ret = rzv2m_i2c_send(priv, msg, &count); in rzv2m_i2c_master_xfer_msg()