summaryrefslogtreecommitdiff
path: root/include/linux/mailbox_client.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-11-28 10:54:10 +0100
committerJassi Brar <jaswinder.singh@linaro.org>2018-12-21 22:31:26 -0600
commita8803d7421cc2be2ac12a8155e5d824f04259eff (patch)
tree76495c4a0e449dfaedfc1dc39b65f39ec8a33f67 /include/linux/mailbox_client.h
parent2298a6f09f455f64bf253e6fb5c1ff72f38a6249 (diff)
downloadlwn-a8803d7421cc2be2ac12a8155e5d824f04259eff.tar.gz
lwn-a8803d7421cc2be2ac12a8155e5d824f04259eff.zip
mailbox: Support blocking transfers in atomic context
The mailbox framework supports blocking transfers via completions for clients that can sleep. In order to support blocking transfers in cases where the transmission is not permitted to sleep, add a new ->flush() callback that controller drivers can implement to busy loop until the transmission has been completed. A new mbox_flush() function can be called by mailbox consumers in atomic context to make sure a transfer has completed. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'include/linux/mailbox_client.h')
-rw-r--r--include/linux/mailbox_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
index 44348710953f..faa7da3c9c8b 100644
--- a/include/linux/mailbox_client.h
+++ b/include/linux/mailbox_client.h
@@ -44,6 +44,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
const char *name);
struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index);
int mbox_send_message(struct mbox_chan *chan, void *mssg);
+int mbox_flush(struct mbox_chan *chan, unsigned long timeout);
void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
void mbox_free_channel(struct mbox_chan *chan); /* may sleep */