linux-stable/include/linux/spi
Miquel Raynal d8e4ebf870
spi: Create a helper to derive adaptive timeouts
Big transfers might take a bit of time, too constraining timeouts might
lead to false positives. In order to simplify the drivers work and with
the goal of factorizing code in mind, let's add a helper that can be
used by any spi controller driver to derive a relevant per-transfer
timeout value.

The logic is simple: we know how much time it would take to transfer a
byte, we can easily derive the total theoretical amount of time involved
for each transfer. We multiply it by two to have a bit of margin and
enforce a minimum of 500ms.

Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/Message-Id: <20230622090634.3411468-2-miquel.raynal@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-22 15:03:18 +01:00
..
ad7877.h
ads7846.h
altera.h spi: altera: switch to use modern name 2022-12-29 13:22:03 +00:00
at73c213.h
corgi_lcd.h
ds1305.h
eeprom.h
flash.h
libertas_spi.h
max7301.h
mc33880.h
mmc_spi.h
mxs-spi.h
pxa2xx_spi.h
rspi.h
sh_hspi.h
sh_msiof.h
spi-fsl-dspi.h
spi-mem.h
spi.h spi: Create a helper to derive adaptive timeouts 2023-06-22 15:03:18 +01:00
spi_bitbang.h
spi_gpio.h
spi_oc_tiny.h
tdo24m.h
tle62x0.h
xilinx_spi.h spi: xilinx: add force_irq for QSPI mode 2023-02-14 18:04:59 +00:00