Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 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); |
Lukasz Majewski | cb7ff44 | 2014-07-29 11:10:44 +0200 | [diff] [blame] | 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); |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 19 | } else { |
Maxime Ripard | 7f78b9d | 2017-09-07 08:58:08 +0200 | [diff] [blame] | 20 | put_unaligned(CONFIG_USB_GADGET_VENDOR_NUM, &dev->idVendor); |
| 21 | put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct); |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 22 | } |
| 23 | return 0; |
| 24 | } |