spi: omap2-mcspi: Ensure that CS is correctly asserted when switching from MULTI mode to SINGLE mode

The OMAP2 support features a "multi" mode, where the controller
automatically sets the Chip Select (CS) when necessary. This mode allows
for shorter delays between CS selection and word content, but the CS is
always deasserted at the end.

The default transfer_one_message function expects the last transfer of a
message to keep the CS enabled. However, when two consecutive messages
use "multi" mode followed by "single" mode, the chipselect is not enabled
during the second message. This discrepancy causes the driver to time
out.

To address this issue, the CS is now reasserted for each new message that
follows a "multi"-mode message. This change ensures proper CS handling
and prevents driver timeouts.

Fixes: d153ff4056cb ("spi: omap2-mcspi: Add support for MULTI-mode")

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://msgid.link/r/20240409-fix-omap2-mcspi-v1-1-f2b881ae196d@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
1 file changed