aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mhi.h
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2020-11-03 18:23:53 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-05 16:54:01 -0800
commitd8c4a22363853e196497b06a8ee9be9773873a14 (patch)
tree48872e93240e08ae2cd9ed7bed33d1e2f65aa417 /include/linux/mhi.h
parentMerge branch 'net-phy-add-support-for-shared-interrupts-part-1' (diff)
downloadwireguard-linux-d8c4a22363853e196497b06a8ee9be9773873a14.tar.xz
wireguard-linux-d8c4a22363853e196497b06a8ee9be9773873a14.zip
bus: mhi: Add mhi_queue_is_full function
This function can be used by client driver to determine whether it's possible to queue new elements in a channel ring. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/1604424234-24446-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/mhi.h')
-rw-r--r--include/linux/mhi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index d4841e5a5f45..b9bb7dff32e2 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -737,4 +737,11 @@ int mhi_queue_buf(struct mhi_device *mhi_dev, enum dma_data_direction dir,
int mhi_queue_skb(struct mhi_device *mhi_dev, enum dma_data_direction dir,
struct sk_buff *skb, size_t len, enum mhi_flags mflags);
+/**
+ * mhi_queue_is_full - Determine whether queueing new elements is possible
+ * @mhi_dev: Device associated with the channels
+ * @dir: DMA direction for the channel
+ */
+bool mhi_queue_is_full(struct mhi_device *mhi_dev, enum dma_data_direction dir);
+
#endif /* _MHI_H_ */