diff options
author | Martin Sperl <kernel@martin.sperl.org> | 2019-02-23 08:49:49 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-13 13:11:36 +0100 |
commit | 5d7e2b5ed5858fe739d4cb8ad22dcce7bd9dbe7b (patch) | |
tree | 6bd17939600e1d69903d15c151b96a68f2b94b5d /drivers/spi | |
parent | e727d4cbc785e9c1b4d239eef274dc63bc1aff24 (diff) | |
download | linux-5d7e2b5ed5858fe739d4cb8ad22dcce7bd9dbe7b.tar.gz linux-5d7e2b5ed5858fe739d4cb8ad22dcce7bd9dbe7b.tar.bz2 linux-5d7e2b5ed5858fe739d4cb8ad22dcce7bd9dbe7b.zip |
spi: core: allow reporting the effectivly used speed_hz for a transfer
Provide a means for the spi bus driver to report the effectively used
spi clock frequency used for each spi_transfer.
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index cfa3c3decb8a..e9bf0c23da50 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3126,6 +3126,7 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message) */ message->frame_length = 0; list_for_each_entry(xfer, &message->transfers, transfer_list) { + xfer->effective_speed_hz = 0; message->frame_length += xfer->len; if (!xfer->bits_per_word) xfer->bits_per_word = spi->bits_per_word; |