Lines Matching refs:nbytes
42 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data()
55 return spi_map_buf(ctlr, dmadev, sgt, op->data.buf.in, op->data.nbytes, in spi_controller_dma_map_mem_op_data()
88 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data()
148 if (op->addr.nbytes && in spi_mem_check_buswidth()
152 if (op->dummy.nbytes && in spi_mem_check_buswidth()
178 if (op->cmd.nbytes != 2) in spi_mem_default_supports_op()
181 if (op->cmd.nbytes != 1) in spi_mem_default_supports_op()
214 if (!op->cmd.buswidth || !op->cmd.nbytes) in spi_mem_check_op()
217 if ((op->addr.nbytes && !op->addr.buswidth) || in spi_mem_check_op()
218 (op->dummy.nbytes && !op->dummy.buswidth) || in spi_mem_check_op()
219 (op->data.nbytes && !op->data.buswidth)) in spi_mem_check_op()
331 len = op->cmd.nbytes + op->addr.nbytes; in spi_mem_add_op_stats()
332 len += op->dummy.nbytes + op->data.nbytes; in spi_mem_add_op_stats()
338 if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT) in spi_mem_add_op_stats()
339 u64_stats_add(&stats->bytes_tx, op->data.nbytes); in spi_mem_add_op_stats()
340 if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_IN) in spi_mem_add_op_stats()
341 u64_stats_add(&stats->bytes_rx, op->data.nbytes); in spi_mem_add_op_stats()
382 op->addr.nbytes, (op->addr.nbytes ? op->addr.val : 0), in spi_mem_exec_op()
383 op->dummy.nbytes, in spi_mem_exec_op()
384 …op->data.nbytes, (op->data.nbytes ? (op->data.dir == SPI_MEM_DATA_IN ? " read" : "write") : " … in spi_mem_exec_op()
420 tmpbufsize = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op()
435 xfers[xferpos].len = op->cmd.nbytes; in spi_mem_exec_op()
442 if (op->addr.nbytes) { in spi_mem_exec_op()
445 for (i = 0; i < op->addr.nbytes; i++) in spi_mem_exec_op()
447 (8 * (op->addr.nbytes - i - 1)); in spi_mem_exec_op()
450 xfers[xferpos].len = op->addr.nbytes; in spi_mem_exec_op()
455 totalxferlen += op->addr.nbytes; in spi_mem_exec_op()
458 if (op->dummy.nbytes) { in spi_mem_exec_op()
459 memset(tmpbuf + op->addr.nbytes + 1, 0xff, op->dummy.nbytes); in spi_mem_exec_op()
460 xfers[xferpos].tx_buf = tmpbuf + op->addr.nbytes + 1; in spi_mem_exec_op()
461 xfers[xferpos].len = op->dummy.nbytes; in spi_mem_exec_op()
467 totalxferlen += op->dummy.nbytes; in spi_mem_exec_op()
470 if (op->data.nbytes) { in spi_mem_exec_op()
479 xfers[xferpos].len = op->data.nbytes; in spi_mem_exec_op()
483 totalxferlen += op->data.nbytes; in spi_mem_exec_op()
542 len = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_adjust_op_size()
547 op->data.nbytes = min3((size_t)op->data.nbytes, in spi_mem_adjust_op_size()
551 if (!op->data.nbytes) in spi_mem_adjust_op_size()
609 ncycles += ((op->cmd.nbytes * 8) / op->cmd.buswidth) / (op->cmd.dtr ? 2 : 1); in spi_mem_calc_op_duration()
610 ncycles += ((op->addr.nbytes * 8) / op->addr.buswidth) / (op->addr.dtr ? 2 : 1); in spi_mem_calc_op_duration()
613 if (op->dummy.nbytes) in spi_mem_calc_op_duration()
614 ncycles += ((op->dummy.nbytes * 8) / op->dummy.buswidth) / (op->dummy.dtr ? 2 : 1); in spi_mem_calc_op_duration()
616 ncycles += ((op->data.nbytes * 8) / op->data.buswidth) / (op->data.dtr ? 2 : 1); in spi_mem_calc_op_duration()
635 op.data.nbytes = len; in spi_mem_no_dirmap_read()
644 return op.data.nbytes; in spi_mem_no_dirmap_read()
655 op.data.nbytes = len; in spi_mem_no_dirmap_write()
664 return op.data.nbytes; in spi_mem_no_dirmap_write()
689 if (!info->op_tmpl.addr.nbytes || info->op_tmpl.addr.nbytes > 8) in spi_mem_dirmap_create()
917 if (op->data.nbytes > 1) in spi_mem_read_status()
953 if (op->data.nbytes < 1 || op->data.nbytes > 2 || in spi_mem_poll_status()