2008-06-19 20:55:23 -04: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-19 20:55:35 -04:00
|
|
|
extern unsigned buflen;
|
2008-06-19 20:55:23 -04:00
|
|
|
extern const struct usb_descriptor_header *otg_desc[];
|
|
|
|
|
|
|
|
/* common utilities */
|
|
|
|
struct usb_request *alloc_ep_req(struct usb_ep *ep);
|
|
|
|
void free_ep_req(struct usb_ep *ep, struct usb_request *req);
|
|
|
|
void disable_endpoints(struct usb_composite_dev *cdev,
|
|
|
|
struct usb_ep *in, struct usb_ep *out);
|
|
|
|
|
|
|
|
/* configuration-specific linkup */
|
2009-03-19 17:16:09 -04:00
|
|
|
int sourcesink_add(struct usb_composite_dev *cdev, bool autoresume);
|
|
|
|
int loopback_add(struct usb_composite_dev *cdev, bool autoresume);
|
2008-06-19 20:55:23 -04:00
|
|
|
|
|
|
|
#endif /* __G_ZERO_H */
|