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>
This commit is contained in:
Sebastian Andrzej Siewior
2011-06-23 14:26:15 +02:00
committed by Greg Kroah-Hartman
parent b5738413c9
commit 352c2dc8b0
2 changed files with 77 additions and 4 deletions

View File

@@ -459,6 +459,12 @@ struct usb_gadget_ops {
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 *);