summaryrefslogtreecommitdiff
path: root/include/linux/spi
diff options
context:
space:
mode:
authorMartin Sperl <kernel@martin.sperl.org>2019-02-23 08:49:49 +0000
committerMark Brown <broonie@kernel.org>2019-05-13 13:11:36 +0100
commit5d7e2b5ed5858fe739d4cb8ad22dcce7bd9dbe7b (patch)
tree6bd17939600e1d69903d15c151b96a68f2b94b5d /include/linux/spi
parente727d4cbc785e9c1b4d239eef274dc63bc1aff24 (diff)
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 'include/linux/spi')
-rw-r--r--include/linux/spi/spi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index f55b20254612..d0c5ba746e01 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -745,6 +745,9 @@ extern void spi_res_release(struct spi_controller *ctlr,
* (set by bits_per_word) transmission.
* @word_delay: clock cycles to inter word delay after each word size
* (set by bits_per_word) transmission.
+ * @effective_speed_hz: the effective SCK-speed that was used to
+ * transfer this transfer. Set to 0 if the spi bus driver does
+ * not support it.
* @transfer_list: transfers are sequenced through @spi_message.transfers
* @tx_sg: Scatterlist for transmit, currently not for client use
* @rx_sg: Scatterlist for receive, currently not for client use
@@ -835,6 +838,8 @@ struct spi_transfer {
u32 speed_hz;
u16 word_delay;
+ u32 effective_speed_hz;
+
struct list_head transfer_list;
};