linux-stable/include/linux/spi
Alexandru Ardelean b2c98153f4
spi: introduce spi_delay struct as "value + unit" & spi_delay_exec()
There are plenty of delays that have been introduced in SPI core. Most of
them are in micro-seconds, some need to be in nano-seconds, and some in
clock-cycles.

For some of these delays (related to transfers & CS timing) it may make
sense to have a `spi_delay` struct that abstracts these a bit.

The important element of these delays [for unification] seems to be the
`unit` of the delay.
It looks like micro-seconds is good enough for most people, but every-once
in a while, some delays seem to require other units of measurement.

This change adds the `spi_delay` struct & a `spi_delay_exec()` function
that processes a `spi_delay` object/struct to execute the delay.
It's a copy of the `cs_change_delay` mechanism, but without the default
for 10 uS.

The clock-cycle delay unit is a bit special, as it needs to be bound to an
`spi_transfer` object to execute.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20190926105147.7839-3-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-15 11:41:25 +01:00
..
ad7877.h
ads7846.h
at73c213.h
at86rf230.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
cc2520.h
corgi_lcd.h
ds1305.h
eeprom.h
flash.h
ifx_modem.h
l4f00242t03.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
libertas_spi.h
lms283gf05.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
max7301.h
mc33880.h
mcp23s08.h
mmc_spi.h
mxs-spi.h
pxa2xx_spi.h
rspi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
s3c24xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sh_hspi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
sh_msiof.h
spi-fsl-dspi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
spi-mem.h
spi.h spi: introduce spi_delay struct as "value + unit" & spi_delay_exec() 2019-10-15 11:41:25 +01:00
spi_bitbang.h
spi_gpio.h
spi_oc_tiny.h
tdo24m.h
tle62x0.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
xilinx_spi.h