blob: ef732befc44ee01f3b514e4b2fbe775c5ef94ea5 [file] [log] [blame]
Lukasz Majewskibddf2722013-10-08 14:30:45 +02001/*
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
11int 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 Majewskicb7ff442014-07-29 11:10:44 +020016 } 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 Majewskibddf2722013-10-08 14:30:45 +020019 } else {
Maxime Ripard7f78b9d2017-09-07 08:58:08 +020020 put_unaligned(CONFIG_USB_GADGET_VENDOR_NUM, &dev->idVendor);
21 put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct);
Lukasz Majewskibddf2722013-10-08 14:30:45 +020022 }
23 return 0;
24}