summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-ti-qspi.c
diff options
context:
space:
mode:
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>2020-10-08 02:55:08 +0300
committerMark Brown <broonie@kernel.org>2020-10-09 01:00:21 +0300
commit14345c33461bc2373bc4f75f40baf4650e95ee54 (patch)
treecfd9ebc5b40dfa0740ea857fc079e5a96d4ee7d8 /drivers/spi/spi-ti-qspi.c
parent84ecaf4a7837e8c0957a59d77fd7e8e4926968cb (diff)
downloadlinux-14345c33461bc2373bc4f75f40baf4650e95ee54.tar.xz
spi: dw: Add poll-based SPI transfers support
A functionality of the poll-based transfer has been removed by commit 1ceb09717e98 ("spi: dw: remove cs_control and poll_mode members from chip_data") with a justification that "there is no user of one anymore". It turns out one of our DW APB SSI core is synthesized with no IRQ line attached and the only possible way of using it is to implement a poll-based SPI transfer procedure. So we have to get the removed functionality back, but with some alterations described below. First of all the poll-based transfer is activated only if the DW SPI controller doesn't have an IRQ line attached and the Linux IRQ number is initialized with the IRQ_NOTCONNECTED value. Secondly the transfer procedure is now executed with a delay performed between writer and reader methods. The delay value is calculated based on the number of data words expected to be received on the current iteration. Finally the errors status is checked on each iteration. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Link: https://lore.kernel.org/r/20201007235511.4935-20-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-ti-qspi.c')
0 files changed, 0 insertions, 0 deletions