mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 12:39:22 -04:00
g_dnl: Issue connect/disconnect as appropriate
Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
This commit is contained in:
parent
8b57e2f081
commit
5a413cae6a
@ -83,7 +83,12 @@ static struct usb_gadget_strings *g_dnl_composite_strings[] = {
|
|||||||
|
|
||||||
static int g_dnl_unbind(struct usb_composite_dev *cdev)
|
static int g_dnl_unbind(struct usb_composite_dev *cdev)
|
||||||
{
|
{
|
||||||
debug("%s\n", __func__);
|
struct usb_gadget *gadget = cdev->gadget;
|
||||||
|
|
||||||
|
debug("%s: calling usb_gadget_disconnect for "
|
||||||
|
"controller '%s'\n", shortname, gadget->name);
|
||||||
|
usb_gadget_disconnect(gadget);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +158,10 @@ static int g_dnl_bind(struct usb_composite_dev *cdev)
|
|||||||
device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
|
device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug("%s: calling usb_gadget_connect for "
|
||||||
|
"controller '%s'\n", shortname, gadget->name);
|
||||||
|
usb_gadget_connect(gadget);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user