aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-08-06 08:11:10 -0400
committerFelipe Balbi <balbi@ti.com>2015-08-06 10:31:45 -0400
commit596c154d62330ea0bb4e3c3e50afa3682e50b617 (patch)
treec11473878bca679d2c70d49116a6c6821b5bba84 /include/linux/usb
parent26bf956aa9952a8141a12f314df70dcd020572d6 (diff)
usb: gadget: add 'ep_match' callback to usb_gadget_ops
Add callback that is called by epautoconf to allow UDC driver match the best endpoint for specific descriptor. It's intended to supply mechanism which allows to get rid of chip-specific endpoint matching code from epautoconf. If gadget has set 'ep_match' callback we prefer to call it first, and if it fails to find matching endpoint, then we try to use default matching algorithm. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/gadget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 82b5bcbd2c98..303214bb2f8b 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -534,6 +534,9 @@ struct usb_gadget_ops {
534 int (*udc_start)(struct usb_gadget *, 534 int (*udc_start)(struct usb_gadget *,
535 struct usb_gadget_driver *); 535 struct usb_gadget_driver *);
536 int (*udc_stop)(struct usb_gadget *); 536 int (*udc_stop)(struct usb_gadget *);
537 struct usb_ep *(*match_ep)(struct usb_gadget *,
538 struct usb_endpoint_descriptor *,
539 struct usb_ss_ep_comp_descriptor *);
537}; 540};
538 541
539/** 542/**