#include <linux/iopoll.h>
#include <linux/usb/composite.h>
#include "mtu3.h"
#include "mtu3_debug.h"
#include "mtu3_trace.h"
#define next_ep0_request(mtu) …
static const u8 mtu3_test_packet[53] = …;
static char *decode_ep0_state(struct mtu3 *mtu)
{ … }
static void ep0_req_giveback(struct mtu3 *mtu, struct usb_request *req)
{ … }
static int
forward_to_driver(struct mtu3 *mtu, const struct usb_ctrlrequest *setup)
__releases(mtu->lock)
__acquires(mtu->lock)
{ … }
static void ep0_write_fifo(struct mtu3_ep *mep, const u8 *src, u16 len)
{ … }
static void ep0_read_fifo(struct mtu3_ep *mep, u8 *dst, u16 len)
{ … }
static void ep0_load_test_packet(struct mtu3 *mtu)
{ … }
static void ep0_stall_set(struct mtu3_ep *mep0, bool set, u32 pktrdy)
{ … }
static void ep0_do_status_stage(struct mtu3 *mtu)
{ … }
static int ep0_queue(struct mtu3_ep *mep0, struct mtu3_request *mreq);
static void ep0_dummy_complete(struct usb_ep *ep, struct usb_request *req)
{ … }
static void ep0_set_sel_complete(struct usb_ep *ep, struct usb_request *req)
{ … }
static int ep0_set_sel(struct mtu3 *mtu, struct usb_ctrlrequest *setup)
{ … }
static int
ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup)
{ … }
static int handle_test_mode(struct mtu3 *mtu, struct usb_ctrlrequest *setup)
{ … }
static int ep0_handle_feature_dev(struct mtu3 *mtu,
struct usb_ctrlrequest *setup, bool set)
{ … }
static int ep0_handle_feature(struct mtu3 *mtu,
struct usb_ctrlrequest *setup, bool set)
{ … }
static int handle_standard_request(struct mtu3 *mtu,
struct usb_ctrlrequest *setup)
{ … }
static void ep0_rx_state(struct mtu3 *mtu)
{ … }
static void ep0_tx_state(struct mtu3 *mtu)
{ … }
static void ep0_read_setup(struct mtu3 *mtu, struct usb_ctrlrequest *setup)
{ … }
static int ep0_handle_setup(struct mtu3 *mtu)
__releases(mtu->lock)
__acquires(mtu->lock)
{ … }
irqreturn_t mtu3_ep0_isr(struct mtu3 *mtu)
{ … }
static int mtu3_ep0_enable(struct usb_ep *ep,
const struct usb_endpoint_descriptor *desc)
{ … }
static int mtu3_ep0_disable(struct usb_ep *ep)
{ … }
static int ep0_queue(struct mtu3_ep *mep, struct mtu3_request *mreq)
{ … }
static int mtu3_ep0_queue(struct usb_ep *ep,
struct usb_request *req, gfp_t gfp)
{ … }
static int mtu3_ep0_dequeue(struct usb_ep *ep, struct usb_request *req)
{ … }
static int mtu3_ep0_halt(struct usb_ep *ep, int value)
{ … }
const struct usb_ep_ops mtu3_ep0_ops = …;