spi: spi-fsl-espi: convert transfer delay to spi_delay format

The way the max delay is computed for this controller, it looks like it is
searching for the max delay from an SPI message a using that.

No idea if this is valid. But this change should support both `delay_usecs`
and the new `delay` data which is of `spi_delay` type.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20190926105147.7839-17-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Alexandru Ardelean
2019-09-26 13:51:44 +03:00
committed by Mark Brown
parent 25093bdeb6
commit 3984d39b0e
3 changed files with 19 additions and 7 deletions

View File

@@ -103,6 +103,7 @@ struct spi_delay {
u8 unit;
};
extern int spi_delay_to_ns(struct spi_delay *_delay, struct spi_transfer *xfer);
extern int spi_delay_exec(struct spi_delay *_delay, struct spi_transfer *xfer);
/**