usb: gadget: add generic map/unmap request utilities
such utilities are currently duplicated on all UDC drivers basically with the same structure. Let's group all implementations into one generic implementation and get rid of that duplication. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
c15e03e155
commit
a698908d3b
2 changed files with 62 additions and 0 deletions
|
@ -950,6 +950,16 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v)
|
|||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* utility to simplify map/unmap of usb_requests to/from DMA */
|
||||
|
||||
extern int usb_gadget_map_request(struct usb_gadget *gadget,
|
||||
struct usb_request *req, int is_in);
|
||||
|
||||
extern void usb_gadget_unmap_request(struct usb_gadget *gadget,
|
||||
struct usb_request *req, int is_in);
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* utility wrapping a simple endpoint selection policy */
|
||||
|
||||
extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue