spi: spi-fsl-dspi: Fix per transfer cs_change handling
authorEsben Haabendal <eha@deif.com>
Wed, 20 Jun 2018 07:34:33 +0000 (09:34 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 20 Jun 2018 13:45:46 +0000 (14:45 +0100)
commit9e1dc9bd099363760afdd2316fc057f9ca38b559
tree8a666f612d5d272df013bf0467d02a89ce7401f9
parent4779f23d1ac8694f7acc537fcadb750bff664ea5
spi: spi-fsl-dspi: Fix per transfer cs_change handling

As of 92dc20d83adec565378254c0630e839ff5674e14, transfer->cs_change has
been supported for non-last transfers, but not for last transfer.

This change brings handling of cs_change in line with the specification in
spi.h, implementing handling of transfer->cs_change for all transfers.

The value for CMD FIFO is precalculated with transfer->cs_change field
taken into account, allowing for CS de-activate between transfers and
keeping CS activated after last transfer.

Signed-off-by: Esben Haabendal <eha@deif.com>
Acked-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c