2008-06-20 07:55:23 +07:00
|
|
|
/*
|
|
|
|
* This header declares the utility functions used by "Gadget Zero", plus
|
|
|
|
* interfaces to its two single-configuration function drivers.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __G_ZERO_H
|
|
|
|
#define __G_ZERO_H
|
|
|
|
|
|
|
|
#include <linux/usb/composite.h>
|
|
|
|
|
|
|
|
/* global state */
|
2008-06-20 07:55:35 +07:00
|
|
|
extern unsigned buflen;
|
2008-06-20 07:55:23 +07:00
|
|
|
extern const struct usb_descriptor_header *otg_desc[];
|
|
|
|
|
|
|
|
/* common utilities */
|
2012-04-17 04:19:06 +07:00
|
|
|
struct usb_request *alloc_ep_req(struct usb_ep *ep, int len);
|
2008-06-20 07:55:23 +07:00
|
|
|
void free_ep_req(struct usb_ep *ep, struct usb_request *req);
|
|
|
|
void disable_endpoints(struct usb_composite_dev *cdev,
|
2012-04-17 04:19:06 +07:00
|
|
|
struct usb_ep *in, struct usb_ep *out,
|
|
|
|
struct usb_ep *iso_in, struct usb_ep *iso_out);
|
2008-06-20 07:55:23 +07:00
|
|
|
|
|
|
|
/* configuration-specific linkup */
|
2009-03-20 04:16:09 +07:00
|
|
|
int sourcesink_add(struct usb_composite_dev *cdev, bool autoresume);
|
|
|
|
int loopback_add(struct usb_composite_dev *cdev, bool autoresume);
|
2008-06-20 07:55:23 +07:00
|
|
|
|
|
|
|
#endif /* __G_ZERO_H */
|