2 * This header declares the utility functions used by "Gadget Zero", plus
3 * interfaces to its two single-configuration function drivers.
9 #define GZERO_BULK_BUFLEN 4096
11 #define GZERO_ISOC_INTERVAL 4
12 #define GZERO_ISOC_MAXPACKET 1024
13 #define GZERO_INT_INTERVAL 1 /* Default interrupt interval = 1 ms */
14 #define GZERO_INT_MAXPACKET 1024
16 struct usb_zero_options
{
18 unsigned isoc_interval
;
19 unsigned isoc_maxpacket
;
21 unsigned isoc_maxburst
;
22 unsigned int_interval
; /* In ms */
23 unsigned int_maxpacket
;
25 unsigned int_maxburst
;
31 struct usb_function_instance func_inst
;
33 unsigned isoc_interval
;
34 unsigned isoc_maxpacket
;
36 unsigned isoc_maxburst
;
37 unsigned int_interval
; /* In ms */
38 unsigned int_maxpacket
;
40 unsigned int_maxburst
;
44 * Read/write access to configfs attributes is handled by configfs.
46 * This is to protect the data from concurrent access by read/write
47 * and create symlink/remove symlink.
54 struct usb_function_instance func_inst
;
59 * Read/write access to configfs attributes is handled by configfs.
61 * This is to protect the data from concurrent access by read/write
62 * and create symlink/remove symlink.
68 void lb_modexit(void);
71 /* common utilities */
72 void free_ep_req(struct usb_ep
*ep
, struct usb_request
*req
);
73 void disable_endpoints(struct usb_composite_dev
*cdev
,
74 struct usb_ep
*in
, struct usb_ep
*out
,
75 struct usb_ep
*iso_in
, struct usb_ep
*iso_out
,
76 struct usb_ep
*int_in
, struct usb_ep
*int_out
);
78 #endif /* __G_ZERO_H */