/linux/drivers/spi/ |
H A D | spi-apple.c | 268 unsigned int bytes_per_word) in apple_spi_tx() argument 283 switch (bytes_per_word) { in apple_spi_tx() 309 *tx_ptr = ((u8 *)*tx_ptr) + bytes_per_word * wrote; in apple_spi_tx() 313 unsigned int bytes_per_word) in apple_spi_rx() argument 328 switch (bytes_per_word) { in apple_spi_rx() 354 *rx_ptr = ((u8 *)*rx_ptr) + bytes_per_word * read; in apple_spi_rx() 364 unsigned int bytes_per_word; in apple_spi_transfer_one() local 372 bytes_per_word = 4; in apple_spi_transfer_one() 374 bytes_per_word = 2; in apple_spi_transfer_one() 376 bytes_per_word in apple_spi_transfer_one() [all...] |
H A D | spi-tegra20-slink.c | 170 unsigned bytes_per_word; member 239 switch (tspi->bytes_per_word) { in tegra_slink_get_packed_size() 264 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_slink_calculate_curr_xfer_param() 277 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_slink_calculate_curr_xfer_param() 280 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_slink_calculate_curr_xfer_param() 306 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf() 317 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf() 320 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_slink_fill_tx_fifo_from_client_txbuf() 326 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf() 343 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_slink_read_rx_fifo_to_client_rxbuf() [all...] |
H A D | spi-tegra114.c | 181 unsigned bytes_per_word; member 267 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_spi_calculate_curr_xfer_param() 280 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_spi_calculate_curr_xfer_param() 283 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_spi_calculate_curr_xfer_param() 309 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf() 319 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf() 324 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf() 331 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_spi_fill_tx_fifo_from_client_txbuf() 356 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf() 364 tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf() 367 u8 bytes_per_word = tspi->bytes_per_word; tegra_spi_read_rx_fifo_to_client_rxbuf() local [all...] |
H A D | spi-altera-core.c | 94 switch (hw->bytes_per_word) { in altera_spi_tx_word() 121 switch (hw->bytes_per_word) { in altera_spi_rx_word() 151 hw->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); in altera_spi_txrx() 152 hw->len = t->len / hw->bytes_per_word; in altera_spi_txrx()
|
H A D | spi-st-ssc4.c | 62 u16 bytes_per_word; member 81 if (spi_st->bytes_per_word == 1) { in ssc_write_tx_fifo() 107 if (spi_st->bytes_per_word == 1) { in ssc_read_rx_fifo() 133 spi_st->bytes_per_word = 2; in spi_st_transfer_one() 141 spi_st->bytes_per_word = 2; in spi_st_transfer_one() 151 spi_st->bytes_per_word = 1; in spi_st_transfer_one()
|
H A D | spi-rzv2h-rspi.c | 78 unsigned int bytes_per_word; member 163 switch (rspi->bytes_per_word) { in rzv2h_rspi_send() 184 switch (rspi->bytes_per_word) { in rzv2h_rspi_receive() 207 words_to_transfer = transfer->len / rspi->bytes_per_word; in rzv2h_rspi_transfer_one() 325 rspi->bytes_per_word = roundup_pow_of_two(BITS_TO_BYTES(bits_per_word)); in rzv2h_rspi_prepare_message()
|
H A D | spi-davinci.c | 127 u8 *bytes_per_word; member 295 dspi->bytes_per_word[spi_get_chipselect(spi, 0)] = 1; in davinci_spi_setup_transfer() 299 dspi->bytes_per_word[spi_get_chipselect(spi, 0)] = 2; in davinci_spi_setup_transfer() 582 data_type = dspi->bytes_per_word[spi_get_chipselect(spi, 0)]; in davinci_spi_bufs() 894 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe() 896 sizeof(*dspi->bytes_per_word), in davinci_spi_probe() 898 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
|
H A D | spi-imx.c | 330 unsigned int bytes_per_word; in spi_imx_buf_rx_swap_u32() local 332 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_rx_swap_u32() 333 if (bytes_per_word == 1) in spi_imx_buf_rx_swap_u32() 335 else if (bytes_per_word == 2) in spi_imx_buf_rx_swap_u32() 377 unsigned int bytes_per_word; in spi_imx_buf_tx_swap_u32() local 387 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_tx_swap_u32() 389 if (bytes_per_word == 1) in spi_imx_buf_tx_swap_u32() 391 else if (bytes_per_word == 2) in spi_imx_buf_tx_swap_u32() 1464 unsigned int bytes_per_word, i; in spi_imx_dma_transfer() local 1468 bytes_per_word in spi_imx_dma_transfer() [all...] |
H A D | spi-npcm-pspi.c | 61 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function 200 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in npcm_pspi_send() 227 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in npcm_pspi_recv()
|
H A D | spi-uniphier.c | 103 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function 256 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in uniphier_spi_send() 283 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in uniphier_spi_recv() 320 unsigned int bpw = bytes_per_word(priv->bits_per_word); in uniphier_spi_fill_tx_fifo() 354 unsigned int bpw = bytes_per_word(priv->bits_per_word); in uniphier_spi_can_dma()
|
H A D | spi-fsl-lpspi.c | 197 unsigned int bytes_per_word; in fsl_lpspi_can_dma() local 202 bytes_per_word = fsl_lpspi_bytes_per_word(transfer->bits_per_word); in fsl_lpspi_can_dma() 204 switch (bytes_per_word) { in fsl_lpspi_can_dma()
|
H A D | spi-rockchip.c | 720 unsigned int bytes_per_word = xfer->bits_per_word <= 8 ? 1 : 2; in rockchip_spi_can_dma() local 726 return xfer->len / bytes_per_word >= rs->fifo_len; in rockchip_spi_can_dma()
|
H A D | spi-amlogic-spisg.c | 158 u32 bytes_per_word; member 602 spisg->bytes_per_word = spi->bits_per_word >> 3; in aml_spisg_prepare_message()
|
H A D | spi-geni-qcom.c | 485 int bytes_per_word = (mas->cur_bits_per_word / BITS_PER_BYTE) + 1; in setup_gsi_xfer() local 487 peripheral.rx_len = (xfer->len / bytes_per_word); in setup_gsi_xfer()
|
/linux/include/linux/spi/ |
H A D | altera.h | 36 int bytes_per_word; member
|