diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-06-06 16:03:19 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-06-13 13:21:03 +0300 |
commit | 67fdfda4a99edea939a63bad1797d69dd8de00d6 (patch) | |
tree | 4f7ab3e9588a88340ddf3c95ef730f0aa76801c9 /include/linux/usb | |
parent | 1b9f35adb0ffa143c7972a8459d6979c77d6c3c0 (diff) |
usb: gadget: core: introduce ->udc_set_speed() method
Sometimes, the gadget driver we want to run has max_speed lower than
what the UDC supports. In such situations, UDC might want to make sure
we don't try to connect on speeds not supported by the gadget
driver (e.g. super-speed capable dwc3 with high-speed capable g_midi)
because that will just fail.
In order to make sure this situation never happens, we introduce a new
optional ->udc_set_speed() method which can be implemented by
interested UDC drivers.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/gadget.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 3ee5f2a7c0b4..1a4a4bacfae6 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -304,6 +304,7 @@ struct usb_gadget_ops { int (*udc_start)(struct usb_gadget *, struct usb_gadget_driver *); int (*udc_stop)(struct usb_gadget *); + void (*udc_set_speed)(struct usb_gadget *, enum usb_device_speed); struct usb_ep *(*match_ep)(struct usb_gadget *, struct usb_endpoint_descriptor *, struct usb_ss_ep_comp_descriptor *); |