]> git.baikalelectronics.ru Git - kernel.git/commit
spi: omap2-mcspi: add support for interword delay
authorAndrea Zanotti <andreazanottifo@gmail.com>
Mon, 2 May 2022 11:13:00 +0000 (13:13 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 4 May 2022 15:02:36 +0000 (16:02 +0100)
commit9ad5ed270c2b9fdae917d47ca3500c92bbfaf780
tree8b46d48b429af0b9c230ad2dd27bcc2e70c0d5b0
parent132f0d8861c1e39431fd72090c3f17b380c68ee4
spi: omap2-mcspi: add support for interword delay

The module omap2-mcspi does not support the interword delay
parameter present in the spi transfer. On one side, if the module
is instructed to use the dma, this parameter is correctly ignored.
However, without the usage of the dma, that parameter should be
used.

The patch introduce the handling of such delay in the omap2-mcspi
module, using standard spi_delay struct. The patch has been tested
using as benchmark a DM3730.

The delay function used (spi_delay_exec) is already present in the
kernel and it checks on its own the validity of the input, as such,
no additional checks are present.

The range of usage of the udelay function is incremented to 200 us,
as the change from udelay to usleep_range introduces not
neglectible delays.

Signed-off-by: Andrea Zanotti <andreazanottifo@gmail.com>
Link: https://lore.kernel.org/r/20220502111300.24754-1-andreazanottifo@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c