spi: make `cs_change_delay` the first user of the `spi_delay` logic
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 26 Sep 2019 10:51:31 +0000 (13:51 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 15 Oct 2019 10:41:47 +0000 (11:41 +0100)
commit329f0dac4cad9fa4b1439a88180d91bcb5c4eaf8
tree4fa784efc9999e85944f4b01a1aaed93032cf325
parentb2c98153f45fc17b9fcb241000f2d131ddea6030
spi: make `cs_change_delay` the first user of the `spi_delay` logic

Since the logic for `spi_delay` struct + `spi_delay_exec()` has been copied
from the `cs_change_delay` logic, it's natural to make this delay, the
first user.

The `cs_change_delay` logic requires that the default remain 10 uS, in case
it is unspecified/unconfigured. So, there is some special handling needed
to do that.

The ADIS library is one of the few users of the new `cs_change_delay`
parameter for an spi_transfer.

The introduction of the `spi_delay` struct, requires that the users of of
`cs_change_delay` get an update. This change also updates the ADIS library.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20190926105147.7839-4-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/iio/imu/adis.c
drivers/spi/spi.c
include/linux/spi/spi.h