usb: gadget: udc-core: add "new-style" registration interface
udc_start() should only trigger the internal state machine and make
minimal house keeping. Before that call udc-core calls the bind()
callback and after the callback the pullup().
udc_stop() is simillar, udc-core calls pullup(), unbind() and finally
udc_stop().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index afb67d9..087f4b9 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -459,6 +459,12 @@
int (*ioctl)(struct usb_gadget *,
unsigned code, unsigned long param);
void (*get_config_params)(struct usb_dcd_config_params *);
+ int (*udc_start)(struct usb_gadget *,
+ struct usb_gadget_driver *);
+ int (*udc_stop)(struct usb_gadget *,
+ struct usb_gadget_driver *);
+
+ /* Those two are deprecated */
int (*start)(struct usb_gadget_driver *,
int (*bind)(struct usb_gadget *));
int (*stop)(struct usb_gadget_driver *);