Lines Matching refs:msg

195 	struct i2c_msg *msg;  member
544 struct i2c_msg *msg = iproc_i2c->msg; in bcm_iproc_i2c_read_valid_bytes() local
548 while (iproc_i2c->rx_bytes < msg->len) { in bcm_iproc_i2c_read_valid_bytes()
555 msg->buf[iproc_i2c->rx_bytes] = in bcm_iproc_i2c_read_valid_bytes()
563 struct i2c_msg *msg = iproc_i2c->msg; in bcm_iproc_i2c_send() local
564 unsigned int tx_bytes = msg->len - iproc_i2c->tx_bytes; in bcm_iproc_i2c_send()
574 val = msg->buf[idx]; in bcm_iproc_i2c_send()
577 if (idx == msg->len - 1) { in bcm_iproc_i2c_send()
604 struct i2c_msg *msg = iproc_i2c->msg; in bcm_iproc_i2c_read() local
608 bytes_left = msg->len - iproc_i2c->rx_bytes; in bcm_iproc_i2c_read()
727 struct i2c_msg *msg) in bcm_iproc_i2c_check_status() argument
743 dev_dbg(iproc_i2c->device, "NAK addr:0x%02x\n", msg->addr); in bcm_iproc_i2c_check_status()
775 struct i2c_msg *msg, in bcm_iproc_i2c_xfer_wait() argument
822 ret = bcm_iproc_i2c_check_status(iproc_i2c, msg); in bcm_iproc_i2c_xfer_wait()
846 struct i2c_msg *msg = &msgs[0]; in bcm_iproc_i2c_xfer_internal() local
855 iproc_i2c->msg = msg; in bcm_iproc_i2c_xfer_internal()
858 addr = i2c_8bit_addr_from_msg(msg); in bcm_iproc_i2c_xfer_internal()
866 tx_bytes = min_t(unsigned int, msg->len, M_TX_RX_FIFO_SIZE - 1); in bcm_iproc_i2c_xfer_internal()
867 if (!(msg->flags & I2C_M_RD)) { in bcm_iproc_i2c_xfer_internal()
869 val = msg->buf[i]; in bcm_iproc_i2c_xfer_internal()
872 if (!process_call && (i == msg->len - 1)) in bcm_iproc_i2c_xfer_internal()
882 msg++; in bcm_iproc_i2c_xfer_internal()
883 iproc_i2c->msg = msg; /* point to second msg */ in bcm_iproc_i2c_xfer_internal()
889 addr = i2c_8bit_addr_from_msg(msg); in bcm_iproc_i2c_xfer_internal()
913 if (!process_call && !(msg->flags & I2C_M_RD) && in bcm_iproc_i2c_xfer_internal()
914 msg->len > iproc_i2c->tx_bytes) in bcm_iproc_i2c_xfer_internal()
923 if (msg->len == 0) { in bcm_iproc_i2c_xfer_internal()
926 } else if (msg->flags & I2C_M_RD) { in bcm_iproc_i2c_xfer_internal()
930 if (msg->len > M_RX_FIFO_MAX_THLD_VALUE) in bcm_iproc_i2c_xfer_internal()
933 iproc_i2c->thld_bytes = msg->len; in bcm_iproc_i2c_xfer_internal()
948 (msg->len << M_CMD_RD_CNT_SHIFT); in bcm_iproc_i2c_xfer_internal()
956 return bcm_iproc_i2c_xfer_wait(iproc_i2c, msg, val); in bcm_iproc_i2c_xfer_internal()