aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mhi.h
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2021-04-07 18:47:13 +0200
committerLoic Poulain <loic.poulain@linaro.org>2021-04-22 14:43:01 +0200
commit2eff3bfdd7594de5eae5b5ff4df3fbfb848395ba (patch)
treeb31553667f549dfc757e8be01d09a7ea5b8fc0f6 /include/linux/mhi.h
parentceecc804ddce819d12c3aeb9e0d2143b4806fc3e (diff)
bus: mhi: Add inbound buffers allocation flagsdx55-dev
Currently, the MHI controller driver defines which channels should have their inbound buffers allocated and queued. But ideally, this is something that should be decided by the MHI device driver instead, which actually deals with that buffers. Add a flag parameter to mhi_prepare_for_transfer allowing to specify if buffers have to be allocated and queued by the MHI stack. Keep auto_queue flag for now, but should be removed at some point. Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Diffstat (limited to 'include/linux/mhi.h')
-rw-r--r--include/linux/mhi.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index 944aa3aa3035..86cea5256e3c 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -60,6 +60,14 @@ enum mhi_flags {
};
/**
+ * enum mhi_chan_flags - MHI channel flags
+ * @MHI_CH_INBOUND_ALLOC_BUFS: Automatically allocate and queue inbound buffers
+ */
+enum mhi_chan_flags {
+ MHI_CH_INBOUND_ALLOC_BUFS = BIT(0),
+};
+
+/**
* enum mhi_device_type - Device types
* @MHI_DEVICE_XFER: Handles data transfer
* @MHI_DEVICE_CONTROLLER: Control device
@@ -719,8 +727,10 @@ void mhi_device_put(struct mhi_device *mhi_dev);
* host and device execution environments match and
* channels are in a DISABLED state.
* @mhi_dev: Device associated with the channels
+ * @flags: MHI channel flags
*/
-int mhi_prepare_for_transfer(struct mhi_device *mhi_dev);
+int mhi_prepare_for_transfer(struct mhi_device *mhi_dev,
+ enum mhi_chan_flags flags);
/**
* mhi_unprepare_from_transfer - Reset UL and DL channels for data transfer.