spi: core: add spi_split_transfers_maxsize
authorMartin Sperl <kernel@martin.sperl.org>
Mon, 14 Dec 2015 15:20:20 +0000 (15:20 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 9 Feb 2016 19:32:07 +0000 (19:32 +0000)
commitd9f1212272818420fcde611a940c1ad611a8b785
tree0799bc9b7950503331bfbb384fbda85a427b9eeb
parent523baf5a0609690cb742b3662b7ccac0ea0b2ef2
spi: core: add spi_split_transfers_maxsize

Add spi_split_transfers_maxsize method that splits
spi_transfers transparently into multiple transfers
that are below the given max-size.

This makes use of the spi_res framework via
spi_replace_transfers to allocate/free the extra
transfers as well as reverting back the changes applied
while processing the spi_message.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h