Lines Matching refs:req

54 	mxc_i2c_req_t req;  member
208 mxc_i2c_req_t *req = &data->req; in i2c_max32_transfer_sync() local
222 while (req->tx_len > data->written) { in i2c_max32_transfer_sync()
225 data->written += MXC_I2C_WriteTXFIFO(i2c, &req->tx_buf[data->written], in i2c_max32_transfer_sync()
226 req->tx_len - data->written); in i2c_max32_transfer_sync()
236 Wrap_MXC_I2C_SetRxCount(i2c, req->rx_len); in i2c_max32_transfer_sync()
237 while (req->rx_len > readb) { in i2c_max32_transfer_sync()
240 readb += MXC_I2C_ReadRXFIFO(i2c, &req->rx_buf[readb], req->rx_len - readb); in i2c_max32_transfer_sync()
249 if ((int_fl0 & ADI_MAX32_I2C_INT_FL0_DONE) && (req->rx_len > readb) && in i2c_max32_transfer_sync()
251 Wrap_MXC_I2C_SetRxCount(i2c, req->rx_len - readb); in i2c_max32_transfer_sync()
254 i2c->fifo = (req->addr << 1) | 0x1; in i2c_max32_transfer_sync()
270 if (req->rx_len) { in i2c_max32_transfer_sync()
296 if (data->req.restart) { in i2c_max32_dma_callback()
380 data->req.restart = !(msgs[i].flags & I2C_MSG_STOP); in i2c_max32_transfer_dma()
436 mxc_i2c_req_t *req = &data->req; in i2c_max32_transfer() local
440 req->i2c = i2c; in i2c_max32_transfer()
441 req->addr = target_address; in i2c_max32_transfer()
454 req->rx_buf = (unsigned char *)msgs[i].buf; in i2c_max32_transfer()
455 req->rx_len = msgs[i].len; in i2c_max32_transfer()
456 req->tx_buf = NULL; in i2c_max32_transfer()
457 req->tx_len = 0; in i2c_max32_transfer()
460 req->tx_buf = (unsigned char *)msgs[i].buf; in i2c_max32_transfer()
461 req->tx_len = msgs[i].len; in i2c_max32_transfer()
462 req->rx_buf = NULL; in i2c_max32_transfer()
463 req->rx_len = 0; in i2c_max32_transfer()
484 Wrap_MXC_I2C_SetRxCount(i2c, req->rx_len); in i2c_max32_transfer()
491 if (req->tx_len) { in i2c_max32_transfer()
492 data->written = MXC_I2C_WriteTXFIFO(i2c, req->tx_buf, 1); in i2c_max32_transfer()
529 mxc_i2c_req_t *req = &data->req; in i2c_max32_transfer() local
533 req->i2c = i2c; in i2c_max32_transfer()
534 req->addr = target_address; in i2c_max32_transfer()
545 req->rx_buf = (unsigned char *)msgs[i].buf; in i2c_max32_transfer()
546 req->rx_len = msgs[i].len; in i2c_max32_transfer()
547 req->tx_buf = NULL; in i2c_max32_transfer()
548 req->tx_len = 0; in i2c_max32_transfer()
551 req->tx_buf = (unsigned char *)msgs[i].buf; in i2c_max32_transfer()
552 req->tx_len = msgs[i].len; in i2c_max32_transfer()
553 req->rx_buf = NULL; in i2c_max32_transfer()
554 req->rx_len = 0; in i2c_max32_transfer()
699 mxc_i2c_req_t *req = &data->req; in i2c_max32_isr_controller() local
722 if (written < req->tx_len) { in i2c_max32_isr_controller()
724 } else if (readb < req->rx_len) { in i2c_max32_isr_controller()
730 if (req->tx_len && in i2c_max32_isr_controller()
732 if (written < req->tx_len) { in i2c_max32_isr_controller()
733 written += MXC_I2C_WriteTXFIFO(i2c, &req->tx_buf[written], in i2c_max32_isr_controller()
734 req->tx_len - written); in i2c_max32_isr_controller()
754 readb += MXC_I2C_ReadRXFIFO(i2c, &req->rx_buf[readb], req->rx_len - readb); in i2c_max32_isr_controller()
755 if (readb == req->rx_len) { in i2c_max32_isr_controller()
772 Wrap_MXC_I2C_SetRxCount(i2c, req->rx_len - readb); in i2c_max32_isr_controller()
774 i2c->fifo = (req->addr << 1) | 0x1; in i2c_max32_isr_controller()