usb: udc: add usb_udc_vbus_handler

This commit updates udc core vbus status, and try to connect
or disconnect gadget.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Peter Chen
2015-03-06 10:36:03 +08:00
committed by Felipe Balbi
parent dfea9c9483
commit 628ef0d273
2 changed files with 37 additions and 1 deletions

View File

@@ -1032,6 +1032,10 @@ extern void usb_gadget_udc_reset(struct usb_gadget *gadget,
extern void usb_gadget_giveback_request(struct usb_ep *ep,
struct usb_request *req);
/*-------------------------------------------------------------------------*/
/* utility to update vbus status for udc core, it may be scheduled */
extern void usb_udc_vbus_handler(struct usb_gadget *gadget, bool status);
/*-------------------------------------------------------------------------*/