1 /* SPDX-License-Identifier: GPL-2.0 */
3 * This header declares the utility functions used by "Gadget Zero", plus
4 * interfaces to its two single-configuration function drivers.
10 #define GZERO_BULK_BUFLEN 4096
12 #define GZERO_ISOC_INTERVAL 4
13 #define GZERO_ISOC_MAXPACKET 1024
14 #define GZERO_SS_BULK_QLEN 1
15 #define GZERO_SS_ISO_QLEN 8
17 struct usb_zero_options
{
19 unsigned isoc_interval
;
20 unsigned isoc_maxpacket
;
22 unsigned isoc_maxburst
;
25 unsigned ss_bulk_qlen
;
30 struct usb_function_instance func_inst
;
32 unsigned isoc_interval
;
33 unsigned isoc_maxpacket
;
35 unsigned isoc_maxburst
;
41 * Read/write access to configfs attributes is handled by configfs.
43 * This is to protect the data from concurrent access by read/write
44 * and create symlink/remove symlink.
51 struct usb_function_instance func_inst
;
56 * Read/write access to configfs attributes is handled by configfs.
58 * This is to protect the data from concurrent access by read/write
59 * and create symlink/remove symlink.
65 void lb_modexit(void);
68 /* common utilities */
69 void disable_endpoints(struct usb_composite_dev
*cdev
,
70 struct usb_ep
*in
, struct usb_ep
*out
,
71 struct usb_ep
*iso_in
, struct usb_ep
*iso_out
);
73 #endif /* __G_ZERO_H */