Lines Matching refs:data

27  * Some controllers might want to do DMA on the data buffer embedded in @op.
32 * op->data.buf.{in,out} is DMA-able before calling this function.
42 if (!op->data.nbytes)
45 if (op->data.dir == SPI_MEM_DATA_OUT && ctlr->dma_tx)
47 else if (op->data.dir == SPI_MEM_DATA_IN && ctlr->dma_rx)
55 return spi_map_buf(ctlr, dmadev, sgt, op->data.buf.in, op->data.nbytes,
56 op->data.dir == SPI_MEM_DATA_IN ?
69 * Some controllers might want to do DMA on the data buffer embedded in @op.
71 * op->data.buf.{in,out} buffer again.
88 if (!op->data.nbytes)
91 if (op->data.dir == SPI_MEM_DATA_OUT && ctlr->dma_tx)
93 else if (op->data.dir == SPI_MEM_DATA_IN && ctlr->dma_rx)
99 op->data.dir == SPI_MEM_DATA_IN ?
156 if (op->data.dir != SPI_MEM_NO_DATA &&
157 spi_check_buswidth_req(mem, op->data.buswidth,
158 op->data.dir == SPI_MEM_DATA_OUT))
169 op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr;
182 if (op->data.ecc) {
206 (op->data.nbytes && !op->data.buswidth))
212 !spi_mem_buswidth_is_valid(op->data.buswidth))
216 if (WARN_ON_ONCE(op->data.dir == SPI_MEM_DATA_IN &&
217 object_is_on_stack(op->data.buf.in)))
220 if (WARN_ON_ONCE(op->data.dir == SPI_MEM_DATA_OUT &&
221 object_is_on_stack(op->data.buf.out)))
393 if (op->data.nbytes) {
394 if (op->data.dir == SPI_MEM_DATA_IN) {
395 xfers[xferpos].rx_buf = op->data.buf.in;
396 xfers[xferpos].rx_nbits = op->data.buswidth;
398 xfers[xferpos].tx_buf = op->data.buf.out;
399 xfers[xferpos].tx_nbits = op->data.buswidth;
402 xfers[xferpos].len = op->data.nbytes;
405 totalxferlen += op->data.nbytes;
441 * spi_mem_adjust_op_size() - Adjust the data size of a SPI mem operation to
446 * Some controllers have FIFO limitations and must split a data transfer
452 * 0 otherwise. Note that @op->data.nbytes will be updated if @op
469 op->data.nbytes = min3((size_t)op->data.nbytes,
473 if (!op->data.nbytes)
488 op.data.buf.in = buf;
489 op.data.nbytes = len;
498 return op.data.nbytes;
508 op.data.buf.out = buf;
509 op.data.nbytes = len;
518 return op.data.nbytes;
546 /* data.dir should either be SPI_MEM_DATA_IN or SPI_MEM_DATA_OUT. */
547 if (info->op_tmpl.data.dir == SPI_MEM_NO_DATA)
636 static int devm_spi_mem_dirmap_match(struct device *dev, void *res, void *data)
643 return *ptr == data;
664 * spi_mem_dirmap_read() - Read data through a direct mapping
672 * This function reads data from a memory device using a direct mapping
675 * Return: the amount of data read from the memory device or a negative error
685 if (desc->info.op_tmpl.data.dir != SPI_MEM_DATA_IN)
710 * spi_mem_dirmap_write() - Write data through a direct mapping
718 * This function writes data to a memory device using a direct mapping
721 * Return: the amount of data written to the memory device or a negative error
731 if (desc->info.op_tmpl.data.dir != SPI_MEM_DATA_OUT)
764 const u8 *bytes = (u8 *)op->data.buf.in;
771 if (op->data.nbytes > 1)
807 if (op->data.nbytes < 1 || op->data.nbytes > 2 ||
808 op->data.dir != SPI_MEM_DATA_IN)