Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[linux-2.6-block.git] / drivers / staging / bcm / InterfaceAdapter.h
CommitLineData
f8942e07
SH
1#ifndef _INTERFACE_ADAPTER_H
2#define _INTERFACE_ADAPTER_H
3
85b331af 4struct bcm_bulk_endpoint_in {
58066272 5 char *bulk_in_buffer;
5c032faa 6 size_t bulk_in_size;
d231be57 7 unsigned char bulk_in_endpointAddr;
decb16b3 8 unsigned int bulk_in_pipe;
85b331af 9};
f8942e07 10
c1fa1eb3 11struct bcm_bulk_endpoint_out {
d231be57 12 unsigned char bulk_out_buffer;
5c032faa 13 size_t bulk_out_size;
d231be57 14 unsigned char bulk_out_endpointAddr;
decb16b3 15 unsigned int bulk_out_pipe;
d0d634d3 16 /* this is used when int out endpoint is used as bulk out end point */
d231be57 17 unsigned char int_out_interval;
c1fa1eb3 18};
f8942e07 19
89a02bfe 20struct bcm_intr_endpoint_in {
58066272 21 char *int_in_buffer;
5c032faa 22 size_t int_in_size;
d231be57
KM
23 unsigned char int_in_endpointAddr;
24 unsigned char int_in_interval;
decb16b3 25 unsigned int int_in_pipe;
89a02bfe 26};
f8942e07 27
de89ec45 28struct bcm_intr_endpoint_out {
58066272 29 char *int_out_buffer;
5c032faa 30 size_t int_out_size;
d231be57
KM
31 unsigned char int_out_endpointAddr;
32 unsigned char int_out_interval;
decb16b3 33 unsigned int int_out_pipe;
de89ec45 34};
f8942e07 35
e8355aa3 36struct bcm_usb_tcb {
f8942e07 37 struct urb *urb;
60896e6b 38 void *psIntfAdapter;
48df0187 39 bool bUsed;
e8355aa3 40};
f8942e07 41
71dd092f 42struct bcm_usb_rcb {
f8942e07 43 struct urb *urb;
60896e6b 44 void *psIntfAdapter;
48df0187 45 bool bUsed;
71dd092f 46};
f8942e07
SH
47
48/*
d0d634d3
KM
49 * This is the interface specific Sub-Adapter
50 * Structure.
51 */
d6861cfe 52struct bcm_interface_adapter {
5c032faa
KM
53 struct usb_device *udev;
54 struct usb_interface *interface;
f8942e07 55 /* Bulk endpoint in info */
85b331af 56 struct bcm_bulk_endpoint_in sBulkIn;
f8942e07 57 /* Bulk endpoint out info */
c1fa1eb3 58 struct bcm_bulk_endpoint_out sBulkOut;
f8942e07 59 /* Interrupt endpoint in info */
89a02bfe 60 struct bcm_intr_endpoint_in sIntrIn;
f8942e07 61 /* Interrupt endpoint out info */
de89ec45 62 struct bcm_intr_endpoint_out sIntrOut;
38d6d8de 63 unsigned long ulInterruptData[2];
f8942e07 64 struct urb *psInterruptUrb;
e8355aa3 65 struct bcm_usb_tcb asUsbTcb[MAXIMUM_USB_TCB];
71dd092f 66 struct bcm_usb_rcb asUsbRcb[MAXIMUM_USB_RCB];
5c032faa
KM
67 atomic_t uNumTcbUsed;
68 atomic_t uCurrTcb;
69 atomic_t uNumRcbUsed;
70 atomic_t uCurrRcb;
2979460d 71 struct bcm_mini_adapter *psAdapter;
48df0187
KM
72 bool bFlashBoot;
73 bool bHighSpeedDevice;
74 bool bSuspended;
75 bool bPreparingForBusSuspend;
f8942e07 76 struct work_struct usbSuspendWork;
d6861cfe 77};
f8942e07
SH
78
79#endif