1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Copyright (C) 2013 Samsung Electronics
4 * Lukasz Majewski <l.majewski@samsung.com>
5 */
6
7 #include <common.h>
8 #include <linux/usb/ch9.h>
9
g_dnl_bind_fixup(struct usb_device_descriptor * dev,const char * name)10 int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
11 {
12 if (!strcmp(name, "usb_dnl_thor")) {
13 put_unaligned(CONFIG_G_DNL_THOR_VENDOR_NUM, &dev->idVendor);
14 put_unaligned(CONFIG_G_DNL_THOR_PRODUCT_NUM, &dev->idProduct);
15 } else if (!strcmp(name, "usb_dnl_ums")) {
16 put_unaligned(CONFIG_G_DNL_UMS_VENDOR_NUM, &dev->idVendor);
17 put_unaligned(CONFIG_G_DNL_UMS_PRODUCT_NUM, &dev->idProduct);
18 } else {
19 put_unaligned(CONFIG_USB_GADGET_VENDOR_NUM, &dev->idVendor);
20 put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct);
21 }
22 return 0;
23 }
24