summaryrefslogtreecommitdiff
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
authorDavid Jander <david@protonic.nl>2022-06-21 08:12:24 +0200
committerMark Brown <broonie@kernel.org>2022-06-27 13:27:16 +0100
commit1714582a3a087eda8786d5a1b32b2ec86ca8a303 (patch)
tree0d8faca526aa19d37bbf338dc5174258a94cc993 /include/linux/spi/spi.h
parent40308f9642a85c30fa7cc5ab8672020cb96ecb66 (diff)
spi: Move ctlr->cur_msg_prepared to struct spi_message
This enables the possibility to transfer a message that is not at the current tip of the async message queue. This is in preparation of the next patch(es) which enable spi_sync messages to skip the queue altogether. Signed-off-by: David Jander <david@protonic.nl> Link: https://lore.kernel.org/r/20220621061234.3626638-2-david@protonic.nl Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index c96f526d9a20..1a75c26742f2 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -385,8 +385,6 @@ extern struct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 ch
* @queue: message queue
* @idling: the device is entering idle state
* @cur_msg: the currently in-flight message
- * @cur_msg_prepared: spi_prepare_message was called for the currently
- * in-flight message
* @cur_msg_mapped: message has been mapped for DMA
* @last_cs: the last chip_select that is recorded by set_cs, -1 on non chip
* selected
@@ -621,7 +619,6 @@ struct spi_controller {
bool running;
bool rt;
bool auto_runtime_pm;
- bool cur_msg_prepared;
bool cur_msg_mapped;
char last_cs;
bool last_cs_mode_high;
@@ -988,6 +985,7 @@ struct spi_transfer {
* @queue: for use by whichever driver currently owns the message
* @state: for use by whichever driver currently owns the message
* @resources: for resource management when the spi message is processed
+ * @prepared: spi_prepare_message was called for the this message
*
* A @spi_message is used to execute an atomic sequence of data transfers,
* each represented by a struct spi_transfer. The sequence is "atomic"
@@ -1037,6 +1035,9 @@ struct spi_message {
/* list of spi_res reources when the spi message is processed */
struct list_head resources;
+
+ /* spi_prepare_message was called for this message */
+ bool prepared;
};
static inline void spi_message_init_no_memset(struct spi_message *m)