spi: rockchip: handle zero length transfers without timing out
authorTobias Schramm <t.schramm@manjaro.org>
Fri, 27 Aug 2021 05:03:57 +0000 (07:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Oct 2021 12:40:55 +0000 (14:40 +0200)
commit2ababcd8c2ababe7f11032b928b9e8ab35af5e8c
tree6fddfe84607547c6a74a047f1894ae2e64679dfc
parent5cd40b137cba45a5a3d0b9a8554f779a3e0e93b4
spi: rockchip: handle zero length transfers without timing out

[ Upstream commit 5457773ef99f25fcc4b238ac76b68e28273250f4 ]

Previously zero length transfers submitted to the Rokchip SPI driver would
time out in the SPI layer. This happens because the SPI peripheral does
not trigger a transfer completion interrupt for zero length transfers.

Fix that by completing zero length transfers immediately at start of
transfer.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Link: https://lore.kernel.org/r/20210827050357.165409-1-t.schramm@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-rockchip.c