g_zero.h 751 B

1234567891011121314151617181920212223242526
  1. /*
  2. * This header declares the utility functions used by "Gadget Zero", plus
  3. * interfaces to its two single-configuration function drivers.
  4. */
  5. #ifndef __G_ZERO_H
  6. #define __G_ZERO_H
  7. #include <linux/usb/composite.h>
  8. /* global state */
  9. extern unsigned buflen;
  10. extern const struct usb_descriptor_header *otg_desc[];
  11. /* common utilities */
  12. struct usb_request *alloc_ep_req(struct usb_ep *ep);
  13. void free_ep_req(struct usb_ep *ep, struct usb_request *req);
  14. void disable_endpoints(struct usb_composite_dev *cdev,
  15. struct usb_ep *in, struct usb_ep *out);
  16. /* configuration-specific linkup */
  17. int sourcesink_add(struct usb_composite_dev *cdev, bool autoresume);
  18. int loopback_add(struct usb_composite_dev *cdev, bool autoresume);
  19. #endif /* __G_ZERO_H */