Skip to content
Commit 72be0ee4 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

spi: altera: Simplify altera_spi_txrx implementation for noirq case



This patch simplifies the code and makes it better in readability.
Now the logic in the while loop is simply
"write to ALTERA_SPI_TXDATA then read from ALTERA_SPI_TXDATA".

There is a slightly logic change because now we avoid a read-write cycle when
hw->len is 0. Since the code in bitbang library will call bitbang->txrx_bufs()
only when t->len is not 0, this is not a problem.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarThomas Chou <thomas@wytron.com.tw>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent d8dfad38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment