diff options
| author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2016-04-18 03:53:39 -0400 |
|---|---|---|
| committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-04-19 04:11:54 -0400 |
| commit | 679ca39fc670a5a95c2b40d2cc8cf2cee2486f7a (patch) | |
| tree | e9b2958d9594cb81ea9df6d6bd945771ad872bcc /include/linux | |
| parent | 5096c4d3bfa75bdd23c78f799aabd08598afb48f (diff) | |
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')
| -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, | |||
| 1223 | 1223 | ||
| 1224 | /* utility to simplify map/unmap of usb_requests to/from DMA */ | 1224 | /* utility to simplify map/unmap of usb_requests to/from DMA */ |
| 1225 | 1225 | ||
| 1226 | extern int usb_gadget_map_request_by_dev(struct device *dev, | ||
| 1227 | struct usb_request *req, int is_in); | ||
| 1226 | extern int usb_gadget_map_request(struct usb_gadget *gadget, | 1228 | extern int usb_gadget_map_request(struct usb_gadget *gadget, |
| 1227 | struct usb_request *req, int is_in); | 1229 | struct usb_request *req, int is_in); |
| 1228 | 1230 | ||
| 1231 | extern void usb_gadget_unmap_request_by_dev(struct device *dev, | ||
| 1232 | struct usb_request *req, int is_in); | ||
| 1229 | extern void usb_gadget_unmap_request(struct usb_gadget *gadget, | 1233 | extern void usb_gadget_unmap_request(struct usb_gadget *gadget, |
| 1230 | struct usb_request *req, int is_in); | 1234 | struct usb_request *req, int is_in); |
| 1231 | 1235 | ||
