]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc4c73559e5a343e208f5189859d2eaad1d08cb83
tree05512355f1cf8b16436565e0d8a8278aa5eaa711
parent7854d69eaec98e57f966f936f82816dd962830c2
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