aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/g_zero.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/g_zero.h')
-rw-r--r--drivers/usb/gadget/g_zero.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/gadget/g_zero.h b/drivers/usb/gadget/g_zero.h
new file mode 100644
index 00000000000..2781221b946
--- /dev/null
+++ b/drivers/usb/gadget/g_zero.h
@@ -0,0 +1,23 @@
+/*
+ * 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 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);
+
+#endif /* __G_ZERO_H */