OSDN Git Service

usb: gadget: core: introduce ->udc_set_speed() method
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 6 Jun 2017 13:03:19 +0000 (16:03 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 13 Jun 2017 10:21:03 +0000 (13:21 +0300)
commit67fdfda4a99edea939a63bad1797d69dd8de00d6
tree4f7ab3e9588a88340ddf3c95ef730f0aa76801c9
parent1b9f35adb0ffa143c7972a8459d6979c77d6c3c0
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>
drivers/usb/gadget/udc/core.c
include/linux/usb/gadget.h