mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![David Brownell](/assets/img/avatar_default.png)
Use the new device-level suspend/resume hooks for Gadget Zero; always enable them with the OTG test mode; and support remote wakeup on both configurations even in non-OTG mode. This ensures that both configurations can pass the USBCV remote wakeup tests when the OTG test mode is enabled. This changes behavior by adding autoresume support to the loopback config even in non-OTG mode; the test failure was that it didn't work in OTG mode. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25 lines
751 B
C
25 lines
751 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, bool autoresume);
|
|
int loopback_add(struct usb_composite_dev *cdev, bool autoresume);
|
|
|
|
#endif /* __G_ZERO_H */
|