Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
usb_ids.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
3  *
4  * This software is licensed under the terms of the GNU General Public
5  * License version 2, as published by the Free Software Foundation, and
6  * may be copied, distributed, and modified under those terms.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  */
13 
14 #ifndef __USB_IDS_H__
15 #define __USB_IDS_H__
16 
17 /*You can replace vendor-ID as yours.*/
18 #define GCT_VID 0x1076
19 
20 /*You can replace product-ID as yours.*/
21 #define GCT_PID1 0x7e00
22 #define GCT_PID2 0x7f00
23 
24 #define USB_DEVICE_ID_MATCH_DEVICE_INTERFACE \
25  (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_CLASS)
26 
27 #define USB_DEVICE_INTF(vend, prod, intf) \
28  .match_flags = USB_DEVICE_ID_MATCH_DEVICE_INTERFACE, \
29  .idVendor = (vend), .idProduct = (prod), .bInterfaceClass = (intf)
30 
31 #define EMERGENCY_PID 0x720f
32 #define BL_PID_MASK 0xffc0
33 
34 #define USB_DEVICE_BOOTLOADER(vid, pid) \
35  {USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD)}, \
36  {USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD|B_DIFF_DL_DRV)}
37 
38 #define USB_DEVICE_CDC_DATA(vid, pid) \
39  {USB_DEVICE_INTF((vid), (pid), USB_CLASS_CDC_DATA)}
40 
41 static const struct usb_device_id id_table[] = {
59 
77 
78  {USB_DEVICE(GCT_VID, EMERGENCY_PID)},
79  { }
80 };
81 
82 #endif /* __USB_IDS_H__ */