diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-05 12:50:40 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-11 21:09:50 +0200 |
commit | b158935f70b9c156903338053216dd0adf7ce31c (patch) | |
tree | 8fc35f89210cf56eb647c64f92a814c2ede84505 /drivers/spi/spi-s3c64xx.c | |
parent | spi/s3c64xx: Use prepare_message() and unprepare_message() (diff) | |
download | linux-b158935f70b9c156903338053216dd0adf7ce31c.tar.xz linux-b158935f70b9c156903338053216dd0adf7ce31c.zip |
spi: Provide common spi_message processing loop
The loops which SPI controller drivers use to process the list of transfers
in a spi_message are typically very similar and have some error prone areas
such as the handling of /CS. Help simplify drivers by factoring this code
out into the core - if drivers provide a transfer_one() function instead
of a transfer_one_message() function the core will handle processing at the
message level.
/CS can be controlled by either setting cs_gpio or providing a set_cs
function. If this is not possible for hardware reasons then both can be
omitted and the driver should continue to implement manual /CS handling.
This is a first step in refactoring and it is expected that there will be
further enhancements, for example factoring out of the mapping of transfers
for DMA and the initiation and completion of interrupt driven transfers.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
0 files changed, 0 insertions, 0 deletions