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