blob: 6a1e57f1645cc2af873aa30c047a46550b207312 [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 {
20 put_unaligned(CONFIG_G_DNL_VENDOR_NUM, &dev->idVendor);
21 put_unaligned(CONFIG_G_DNL_PRODUCT_NUM, &dev->idProduct);
22 }
23 return 0;
24}