Merge greybus driver tree into 4.8-rc6
[sfrench/cifs-2.6.git] / drivers / staging / greybus / Documentation / es1_ap_desc.c
1 /* ES1 AP Bridge Chip USB descriptor definitions */
2
3 static const u8 es1_dev_descriptor[] = {
4         0x12,           /* __u8   bLength */
5         0x01,           /* __u8   bDescriptorType; Device */
6         0x00, 0x02      /* __le16 bcdUSB v2.0 */
7         0x00,           /* __u8   bDeviceClass */
8         0x00,           /* __u8   bDeviceClass */
9         0x00,           /* __u8   bDeviceSubClass; */
10         0x00,           /* __u8   bDeviceProtocol; */
11         0x40,           /* __u8   bMaxPacketSize0; 2^64 = 512 Bytes */
12
13         0xff, 0xff,     /* __le16 idVendor; 0xffff  made up for now */
14         0x01, 0x00,     /* __le16 idProduct; 0x0001  made up for now */
15         0x01, 0x00,     /* __le16 bcdDevice; ES1 */
16
17         0x03,           /* __u8  iManufacturer; */
18         0x02,           /* __u8  iProduct; */
19         0x01,           /* __u8  iSerialNumber; */
20         0x01            /* __u8  bNumConfigurations; */
21 };
22
23 static const u8 es1_config_descriptor[] = {
24         /* one configuration */
25         0x09,           /*  __u8   bLength; */
26         0x02,           /*  __u8   bDescriptorType; Configuration */
27         0x19, 0x00,     /*  __le16 wTotalLength; */
28         0x01,           /*  __u8   bNumInterfaces; (1) */
29         0x01,           /*  __u8   bConfigurationValue; */
30         0x00,           /*  __u8   iConfiguration; */
31         0xc0,           /*  __u8   bmAttributes;
32                                  Bit 7: must be set,
33                                      6: Self-powered,
34                                      5: Remote wakeup,
35                                      4..0: resvd */
36         0x00,           /*  __u8  MaxPower; */
37
38         /* one interface */
39         0x09,           /*  __u8  if_bLength; */
40         0x04,           /*  __u8  if_bDescriptorType; Interface */
41         0x00,           /*  __u8  if_bInterfaceNumber; */
42         0x00,           /*  __u8  if_bAlternateSetting; */
43         0x03,           /*  __u8  if_bNumEndpoints; */
44         0xff,           /*  __u8  if_bInterfaceClass; Vendor-specific */
45         0xff,           /*  __u8  if_bInterfaceSubClass; Vendor-specific */
46         0xff,           /*  __u8  if_bInterfaceProtocol; Vendor-specific */
47         0x00,           /*  __u8  if_iInterface; */
48
49         /* three endpoints */
50         0x07,           /*  __u8   ep_bLength; */
51         0x05,           /*  __u8   ep_bDescriptorType; Endpoint */
52         0x81,           /*  __u8   ep_bEndpointAddress; IN Endpoint 1 */
53         0x03,           /*  __u8   ep_bmAttributes; Interrupt */
54         0x00, 0x04,     /*  __le16 ep_wMaxPacketSize; 1024 */
55         0x40,           /*  __u8   ep_bInterval; 64ms */
56
57         0x07,           /*  __u8   ep_bLength; */
58         0x05,           /*  __u8   ep_bDescriptorType; Endpoint */
59         0x82,           /*  __u8   ep_bEndpointAddress; IN Endpoint 2 */
60         0x02,           /*  __u8   ep_bmAttributes; Bulk */
61         0x00, 0x04,     /*  __le16 ep_wMaxPacketSize; 1024 */
62         0x40            /*  __u8   ep_bInterval; */
63
64         0x07,           /*  __u8   ep_bLength; */
65         0x05,           /*  __u8   ep_bDescriptorType; Endpoint */
66         0x02,           /*  __u8   ep_bEndpointAddress; Out Endpoint 2 */
67         0x02,           /*  __u8   ep_bmAttributes; Bulk */
68         0x00, 0x04,     /*  __le16 ep_wMaxPacketSize; 1024 */
69         0x40            /*  __u8   ep_bInterval; */
70 };