#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/prefetch.h>
#include <linux/clk.h>
#include <linux/usb/gadget.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/dma-mapping.h>
#include "vhub.h"
int ast_vhub_reply(struct ast_vhub_ep *ep, char *ptr, int len)
{ … }
int __ast_vhub_simple_reply(struct ast_vhub_ep *ep, int len, ...)
{ … }
void ast_vhub_ep0_handle_setup(struct ast_vhub_ep *ep)
{ … }
static void ast_vhub_ep0_do_send(struct ast_vhub_ep *ep,
struct ast_vhub_req *req)
{ … }
static void ast_vhub_ep0_rx_prime(struct ast_vhub_ep *ep)
{ … }
static void ast_vhub_ep0_do_receive(struct ast_vhub_ep *ep, struct ast_vhub_req *req,
unsigned int len)
{ … }
void ast_vhub_ep0_handle_ack(struct ast_vhub_ep *ep, bool in_ack)
{ … }
static int ast_vhub_ep0_queue(struct usb_ep* u_ep, struct usb_request *u_req,
gfp_t gfp_flags)
{ … }
static int ast_vhub_ep0_dequeue(struct usb_ep* u_ep, struct usb_request *u_req)
{ … }
static const struct usb_ep_ops ast_vhub_ep0_ops = …;
void ast_vhub_reset_ep0(struct ast_vhub_dev *dev)
{ … }
void ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep,
struct ast_vhub_dev *dev)
{ … }