Lines Matching full:transfer

224  * @transfer_one_dma_start: routine to start transfer a single spi_transfer
274 * @cur_xferlen: current transfer length in bytes
275 * @cur_usedma: boolean to know if dma is used in current transfer
280 * @dma_tx: dma channel for TX transfer
281 * @dma_rx: dma channel for RX transfer
328 /* SPI data transfer is enabled but spi_ker_ck is idle.
716 * stm32_spi_can_dma - Determine if the transfer is eligible for DMA use
719 * @transfer: pointer to spi transfer
721 * If driver has fifo and the current transfer size is greater than fifo size,
722 * use DMA. Otherwise use DMA for transfer longer than defined DMA min bytes.
726 struct spi_transfer *transfer) in stm32_spi_can_dma() argument
737 (transfer->len > dma_size) ? "true" : "false"); in stm32_spi_can_dma()
739 return (transfer->len > dma_size); in stm32_spi_can_dma()
793 * so stop the current transfer. Transfer can wait for next in stm32f4_spi_irq_event()
896 * that something went wrong, so stop the current transfer in stm32h7_spi_irq_thread()
903 dev_warn(spi->dev, "Mode fault: transfer aborted\n"); in stm32h7_spi_irq_thread()
941 * stm32_spi_prepare_msg - set up the controller to transfer a single message
1012 * DMA callback is called when the transfer is complete for DMA TX channel.
1028 * DMA callback is called when the transfer is complete for DMA RX channel.
1040 * transfer bits_per_word.
1043 * @dir: direction of the dma transfer
1089 * stm32f4_spi_transfer_one_irq - transfer a single spi_transfer using
1093 * It must returns 0 if the transfer is finished or 1 if the transfer is still
1122 /* starting data transfer when buffer is loaded */ in stm32f4_spi_transfer_one_irq()
1132 * stm32h7_spi_transfer_one_irq - transfer a single spi_transfer using
1136 * It must returns 0 if the transfer is finished or 1 if the transfer is still
1152 /* Enable the interrupts relative to the end of transfer */ in stm32h7_spi_transfer_one_irq()
1160 /* Be sure to have data in fifo before starting data transfer */ in stm32h7_spi_transfer_one_irq()
1175 * transfer using DMA
1180 /* In DMA mode end of transfer is handled by DMA TX or RX callback. */ in stm32f4_spi_transfer_one_dma_start()
1196 * transfer using DMA
1215 * stm32_spi_transfer_one_dma - transfer a single spi_transfer using DMA
1219 * It must returns 0 if the transfer is finished or 1 if the transfer is still
1313 dev_info(spi->dev, "DMA issue: fall back to irq transfer\n"); in stm32_spi_transfer_one_dma()
1375 * stm32_spi_communication_type - return transfer communication type
1377 * @transfer: pointer to spi transfer
1380 struct spi_transfer *transfer) in stm32_spi_communication_type() argument
1389 * transfer. in stm32_spi_communication_type()
1391 if (!transfer->tx_buf) in stm32_spi_communication_type()
1396 if (!transfer->tx_buf) in stm32_spi_communication_type()
1398 else if (!transfer->rx_buf) in stm32_spi_communication_type()
1472 * @len: transfer len
1498 * stm32h7_spi_number_of_data - configure number of data at current transfer
1500 * @nb_words: transfer length (in words)
1515 * stm32_spi_transfer_one_setup - common setup to transfer a single
1520 * @transfer: pointer to spi transfer
1524 struct spi_transfer *transfer) in stm32_spi_transfer_one_setup() argument
1533 spi->cur_xferlen = transfer->len; in stm32_spi_transfer_one_setup()
1535 spi->cur_bpw = transfer->bits_per_word; in stm32_spi_transfer_one_setup()
1539 mbr = stm32_spi_prepare_mbr(spi, transfer->speed_hz, in stm32_spi_transfer_one_setup()
1547 transfer->speed_hz = spi->cur_speed; in stm32_spi_transfer_one_setup()
1550 comm_type = stm32_spi_communication_type(spi_dev, transfer); in stm32_spi_transfer_one_setup()
1558 spi->cfg->set_data_idleness(spi, transfer->len); in stm32_spi_transfer_one_setup()
1561 nb_words = transfer->len; in stm32_spi_transfer_one_setup()
1563 nb_words = DIV_ROUND_UP(transfer->len * 8, 16); in stm32_spi_transfer_one_setup()
1565 nb_words = DIV_ROUND_UP(transfer->len * 8, 32); in stm32_spi_transfer_one_setup()
1573 dev_dbg(spi->dev, "transfer communication mode set to %d\n", in stm32_spi_transfer_one_setup()
1579 dev_dbg(spi->dev, "transfer of %d bytes (%d data frames)\n", in stm32_spi_transfer_one_setup()
1591 * stm32_spi_transfer_one - transfer a single spi_transfer
1594 * @transfer: pointer to spi transfer
1596 * It must return 0 if the transfer is finished or 1 if the transfer is still
1601 struct spi_transfer *transfer) in stm32_spi_transfer_one() argument
1606 spi->tx_buf = transfer->tx_buf; in stm32_spi_transfer_one()
1607 spi->rx_buf = transfer->rx_buf; in stm32_spi_transfer_one()
1608 spi->tx_len = spi->tx_buf ? transfer->len : 0; in stm32_spi_transfer_one()
1609 spi->rx_len = spi->rx_buf ? transfer->len : 0; in stm32_spi_transfer_one()
1612 master->can_dma(master, spi_dev, transfer)); in stm32_spi_transfer_one()
1614 ret = stm32_spi_transfer_one_setup(spi, spi_dev, transfer); in stm32_spi_transfer_one()
1616 dev_err(spi->dev, "SPI transfer setup failed\n"); in stm32_spi_transfer_one()
1621 return stm32_spi_transfer_one_dma(spi, transfer); in stm32_spi_transfer_one()