Commit a400cadc authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

usb gadget zero: split out source/sink config

This splits the gadget zero "source/sink" 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.

Neither this, nor its sibling "loopback" configuration, is a function
driver that can be combined with other functions.  (The host "usbtest"
driver wouldn't know how to deal with that!)  However the code becomes
simpler because of this conversion, so it's a net win.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 40982be5
This diff is collapsed.
/*
* 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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment