Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: sun4i: update max transfer size reported

The spi-sun4i driver already has the ability to do large transfers.
However, the max transfer size reported is still fifo depth - 1.

Update the max transfer size reported to the max value possible.

Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size")
Signed-off-by: Jonathan Liu <net147@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20200727072328.510798-1-net147@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jonathan Liu and committed by
Mark Brown
241b8887 525c9e5a

+1 -1
+1 -1
drivers/spi/spi-sun4i.c
··· 198 198 199 199 static size_t sun4i_spi_max_transfer_size(struct spi_device *spi) 200 200 { 201 - return SUN4I_FIFO_DEPTH - 1; 201 + return SUN4I_MAX_XFER_SIZE - 1; 202 202 } 203 203 204 204 static int sun4i_spi_transfer_one(struct spi_master *master,