예제 #1
0
파일: g_dnl.c 프로젝트: disdi/u-boot-cavium
static int g_dnl_do_config(struct usb_configuration *c)
{
	const char *s = c->cdev->driver->name;
	int ret = -1;

	debug("%s: configuration: 0x%p composite dev: 0x%p\n",
	      __func__, c, c->cdev);

	printf("GADGET DRIVER: %s\n", s);
	if (!strcmp(s, "usb_dnl_dfu"))
		ret = dfu_add(c);
	else if (!strcmp(s, "usb_dnl_ums"))
		ret = fsg_add(c);

	return ret;
}
예제 #2
0
static int g_dnl_do_config(struct usb_configuration *c)
{
	const char *s = c->cdev->driver->name;
	int ret = -1;

	debug("%s: configuration: 0x%p composite dev: 0x%p\n",
	      __func__, c, c->cdev);

	printf("GADGET DRIVER: %s\n", s);
#if defined(CONFIG_DFU_FUNCTION)
	if (!strcmp(s, "usb_dnl_dfu"))
		ret = dfu_add(c);
#endif
#if defined(CONFIG_CMD_FASTBOOT)
        if (!strcmp(s, "usb_dnl_fastboot"))
                ret = fastboot_add(c);
#endif
#if defined(CONFIG_USB_GADGET_MASS_STORAGE)
	if (!strcmp(s, "usb_dnl_ums"))
		ret = fsg_add(c);
#endif

	return ret;
}