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