spi: sh: Switch to using core message queue
authorMark Brown <broonie@kernel.org>
Fri, 10 Jun 2022 15:46:49 +0000 (16:46 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jun 2022 12:24:35 +0000 (13:24 +0100)
commite2185072a4a4786eb46be046cf20494c08dcc78f
tree05512355f1cf8b16436565e0d8a8278aa5eaa711
parent595d68c1b7a81c6cfbdd7c8b50c1e047dc1087ac
spi: sh: Switch to using core message queue

We deprecated open coding of the transfer queue back in 2017 so it's high
time we finished up converting drivers to use the standard message queue
code. The SH driver is fairly straightforward so convert to use
transfer_one_message(), it looks like the driver would be a good fit for
transfer_one() with a little bit of updating but this smaller change seems
safer.

I'm not actually clear how the driver worked robustly previously, it
clears SSA and CR1 when queueing a transfer which looks like it would
interfere with any running transfer. This clearing has been moved to the
start of the message transfer function.

I'm also unclear how exactly the chip select is managed with this driver.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220610154649.1707851-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sh.c