It is used for udc to pullup dp when necessary Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx> --- drivers/usb/gadget/legacy/dbgp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c index 986fc51..bcc780b 100644 --- a/drivers/usb/gadget/legacy/dbgp.c +++ b/drivers/usb/gadget/legacy/dbgp.c @@ -402,6 +402,17 @@ fail: return err; } +/* + * UDC driver calls this when it wants to pull up dp. + */ +static int dbgp_connect(struct usb_gadget *gadget, bool connect) +{ + if (connect) + return usb_gadget_connect(gadget); + else + return usb_gadget_disconnect(gadget); +} + static __refdata struct usb_gadget_driver dbgp_driver = { .function = "dbgp", .max_speed = USB_SPEED_HIGH, @@ -409,6 +420,7 @@ static __refdata struct usb_gadget_driver dbgp_driver = { .unbind = dbgp_unbind, .setup = dbgp_setup, .disconnect = dbgp_disconnect, + .connect = dbgp_connect, .driver = { .owner = THIS_MODULE, .name = "dbgp" -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html