android_kernel_xiaomi_sm8350/drivers/usb/gadget/g_zero.h
David Brownell e5760fdac8 usb gadget zero: split out loopback config
This splits the gadget zero "loopback" configuration into a standalone
"configuration driver", building on the composite gadget framework code.
It doesn't yet pull the original code out of gadget zero or update how
that driver is built.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:03 -07:00

26 lines
717 B
C

/*
* 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 */
extern unsigned buflen;
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 */
int sourcesink_add(struct usb_composite_dev *cdev);
int loopback_add(struct usb_composite_dev *cdev);
#endif /* __G_ZERO_H */