[PATCH v2 2/2] spi/spi-bcm2835: Add bcm2835_spi_transfer_one_message in spi-bcm2835.c
Lukas Wunner
lukas at wunner.de
Sun Feb 25 16:49:03 UTC 2018
On Sat, Feb 24, 2018 at 06:17:12PM +0000, Meghana Madhyastha wrote:
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -1003,7 +1003,7 @@ static int spi_map_msg(struct spi_controller *ctlr, struct spi_message *msg)
> * drivers which implement a transfer_one() operation. It provides
> * standard handling of delays and chip select management.
> */
> -static int spi_transfer_one_message(struct spi_controller *ctlr,
> +int spi_transfer_one_message(struct spi_controller *ctlr,
An alternative to exporting this function would be to have it check
if any of the transfers in the message exceed ctlr->max_dma_len,
and automatically split those. That's for Mark to decide.
> if (xfer->tx_buf || xfer->rx_buf) {
> reinit_completion(&ctlr->xfer_completion);
> -
Spurious deleted newline.
> /* calculate how many we have to replace */
> count = DIV_ROUND_UP(xfer->len, maxsize);
> -
Another one.
Thanks,
Lukas
More information about the dri-devel
mailing list