|
@@ -123,6 +123,23 @@ EXPORT_SYMBOL_GPL(usb_gadget_set_state);
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * usb_gadget_udc_reset - notifies the udc core that bus reset occurs
|
|
|
|
+ * @gadget: The gadget which bus reset occurs
|
|
|
|
+ * @driver: The gadget driver we want to notify
|
|
|
|
+ *
|
|
|
|
+ * If the udc driver has bus reset handler, it needs to call this when the bus
|
|
|
|
+ * reset occurs, it notifies the gadget driver that the bus reset occurs as
|
|
|
|
+ * well as updates gadget state.
|
|
|
|
+ */
|
|
|
|
+void usb_gadget_udc_reset(struct usb_gadget *gadget,
|
|
|
|
+ struct usb_gadget_driver *driver)
|
|
|
|
+{
|
|
|
|
+ driver->reset(gadget);
|
|
|
|
+ usb_gadget_set_state(gadget, USB_STATE_DEFAULT);
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL_GPL(usb_gadget_udc_reset);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* usb_gadget_udc_start - tells usb device controller to start up
|
|
* usb_gadget_udc_start - tells usb device controller to start up
|
|
* @gadget: The gadget we want to get started
|
|
* @gadget: The gadget we want to get started
|