diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2016-04-18 10:53:39 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-04-19 11:11:54 +0300 |
commit | 679ca39fc670a5a95c2b40d2cc8cf2cee2486f7a (patch) | |
tree | e9b2958d9594cb81ea9df6d6bd945771ad872bcc /include/linux/usb/gadget.h | |
parent | 5096c4d3bfa75bdd23c78f799aabd08598afb48f (diff) | |
download | linux-679ca39fc670a5a95c2b40d2cc8cf2cee2486f7a.tar.xz |
usb: gadget: udc: core: add usb_gadget_{un}map_request_by_dev()
If the following environment, the first argument of DMA API should
be set to a DMAC's device structure, not a udc controller's one.
- A udc controller needs an external DMAC device (like a DMA Engine).
- The external DMAC enables IOMMU.
So, this patch add usb_gadget_{un}map_request_by_dev() API to set
a DMAC's device structure by a udc controller driver.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r-- | include/linux/usb/gadget.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 5d4e151c49bf..457651bf45b0 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -1223,9 +1223,13 @@ int usb_otg_descriptor_init(struct usb_gadget *gadget, /* utility to simplify map/unmap of usb_requests to/from DMA */ +extern int usb_gadget_map_request_by_dev(struct device *dev, + struct usb_request *req, int is_in); extern int usb_gadget_map_request(struct usb_gadget *gadget, struct usb_request *req, int is_in); +extern void usb_gadget_unmap_request_by_dev(struct device *dev, + struct usb_request *req, int is_in); extern void usb_gadget_unmap_request(struct usb_gadget *gadget, struct usb_request *req, int is_in); |