blob: 6d783e61e0d347fae17294576f822f30f3cef016 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Lukasz Majewskice2757b2013-10-08 14:30:45 +02002/*
3 * Copyright (C) 2013 Samsung Electronics
4 * Lukasz Majewski <l.majewski@samsung.com>
Lukasz Majewskice2757b2013-10-08 14:30:45 +02005 */
6
7#include <common.h>
8#include <linux/usb/ch9.h>
9
10int 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);
Lukasz Majewski8fc17132014-07-29 11:10:44 +020015 } 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);
Lukasz Majewskice2757b2013-10-08 14:30:45 +020018 } else {
Maxime Riparda95aee62017-09-07 08:58:08 +020019 put_unaligned(CONFIG_USB_GADGET_VENDOR_NUM, &dev->idVendor);
20 put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct);
Lukasz Majewskice2757b2013-10-08 14:30:45 +020021 }
22 return 0;
23}