Commit 314cb2e3 authored by Mark Brown's avatar Mark Brown Committed by Neena Busireddy
Browse files

spi: Provide core support for full duplex devices



It is fairly common for SPI devices to require that one or both transfer
directions is always active. Currently drivers open code this in various
ways with varying degrees of efficiency. Start factoring this out by
providing flags SPI_MASTER_MUST_TX and SPI_MASTER_MUST_RX. These will cause
the core to provide buffers for the requested direction if none are
specified in the underlying transfer.

Currently this is fairly inefficient since we actually allocate a data
buffer which may get large, support for mapping transfers using a
scatterlist will allow us to avoid this for DMA based transfers.

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
(cherry picked from commit 3a2eba9b)
(cherry picked from commit d88018dac8450a46cf68d5bd9711bf71cc751e8d)
parent 11f75efa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment