linux/drivers/usb/renesas_usbhs/mod_gadget.c

// SPDX-License-Identifier: GPL-1.0+
/*
 * Renesas USB driver
 *
 * Copyright (C) 2011 Renesas Solutions Corp.
 * Copyright (C) 2019 Renesas Electronics Corporation
 * Kuninori Morimoto <[email protected]>
 */
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb/otg.h>
#include "common.h"

/*
 *		struct
 */
struct usbhsg_request {};

#define EP_NAME_SIZE
struct usbhsg_gpriv;
struct usbhsg_uep {};

struct usbhsg_gpriv {};

struct usbhsg_recip_handle {};

/*
 *		macro
 */
#define usbhsg_priv_to_gpriv(priv)

#define __usbhsg_for_each_uep(start, pos, g, i)

#define usbhsg_for_each_uep(pos, gpriv, i)

#define usbhsg_for_each_uep_with_dcp(pos, gpriv, i)

#define usbhsg_gadget_to_gpriv(g)

#define usbhsg_req_to_ureq(r)

#define usbhsg_ep_to_uep(e)
#define usbhsg_gpriv_to_dev(gp)
#define usbhsg_gpriv_to_priv(gp)
#define usbhsg_gpriv_to_dcp(gp)
#define usbhsg_gpriv_to_nth_uep(gp, i)
#define usbhsg_uep_to_gpriv(u)
#define usbhsg_uep_to_pipe(u)
#define usbhsg_pipe_to_uep(p)
#define usbhsg_is_dcp(u)

#define usbhsg_ureq_to_pkt(u)
#define usbhsg_pkt_to_ureq(i)

#define usbhsg_is_not_connected(gp)

/* status */
#define usbhsg_status_init(gp)
#define usbhsg_status_set(gp, b)
#define usbhsg_status_clr(gp, b)
#define usbhsg_status_has(gp, b)

/*
 *		queue push/pop
 */
static void __usbhsg_queue_pop(struct usbhsg_uep *uep,
			       struct usbhsg_request *ureq,
			       int status)
{}

static void usbhsg_queue_pop(struct usbhsg_uep *uep,
			     struct usbhsg_request *ureq,
			     int status)
{}

static void usbhsg_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
{}

static void usbhsg_queue_push(struct usbhsg_uep *uep,
			      struct usbhsg_request *ureq)
{}

/*
 *		dma map/unmap
 */
static int usbhsg_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt,
			       int map)
{}

/*
 *		USB_TYPE_STANDARD / clear feature functions
 */
static int usbhsg_recip_handler_std_control_done(struct usbhs_priv *priv,
						 struct usbhsg_uep *uep,
						 struct usb_ctrlrequest *ctrl)
{}

static int usbhsg_recip_handler_std_clear_endpoint(struct usbhs_priv *priv,
						   struct usbhsg_uep *uep,
						   struct usb_ctrlrequest *ctrl)
{}

static struct usbhsg_recip_handle req_clear_feature =;

/*
 *		USB_TYPE_STANDARD / set feature functions
 */
static int usbhsg_recip_handler_std_set_device(struct usbhs_priv *priv,
						 struct usbhsg_uep *uep,
						 struct usb_ctrlrequest *ctrl)
{}

static int usbhsg_recip_handler_std_set_endpoint(struct usbhs_priv *priv,
						 struct usbhsg_uep *uep,
						 struct usb_ctrlrequest *ctrl)
{}

static struct usbhsg_recip_handle req_set_feature =;

/*
 *		USB_TYPE_STANDARD / get status functions
 */
static void __usbhsg_recip_send_complete(struct usb_ep *ep,
					 struct usb_request *req)
{}

static void __usbhsg_recip_send_status(struct usbhsg_gpriv *gpriv,
				       unsigned short status)
{}

static int usbhsg_recip_handler_std_get_device(struct usbhs_priv *priv,
					       struct usbhsg_uep *uep,
					       struct usb_ctrlrequest *ctrl)
{}

static int usbhsg_recip_handler_std_get_interface(struct usbhs_priv *priv,
						  struct usbhsg_uep *uep,
						  struct usb_ctrlrequest *ctrl)
{}

static int usbhsg_recip_handler_std_get_endpoint(struct usbhs_priv *priv,
						 struct usbhsg_uep *uep,
						 struct usb_ctrlrequest *ctrl)
{}

static struct usbhsg_recip_handle req_get_status =;

/*
 *		USB_TYPE handler
 */
static int usbhsg_recip_run_handle(struct usbhs_priv *priv,
				   struct usbhsg_recip_handle *handler,
				   struct usb_ctrlrequest *ctrl)
{}

/*
 *		irq functions
 *
 * it will be called from usbhs_interrupt
 */
static int usbhsg_irq_dev_state(struct usbhs_priv *priv,
				struct usbhs_irq_state *irq_state)
{}

static int usbhsg_irq_ctrl_stage(struct usbhs_priv *priv,
				 struct usbhs_irq_state *irq_state)
{}

/*
 *
 *		usb_dcp_ops
 *
 */
static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
{}

/*
 *
 *		usb_ep_ops
 *
 */
static int usbhsg_ep_enable(struct usb_ep *ep,
			 const struct usb_endpoint_descriptor *desc)
{}

static int usbhsg_ep_disable(struct usb_ep *ep)
{}

static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep,
						   gfp_t gfp_flags)
{}

static void usbhsg_ep_free_request(struct usb_ep *ep,
				   struct usb_request *req)
{}

static int usbhsg_ep_queue(struct usb_ep *ep, struct usb_request *req,
			  gfp_t gfp_flags)
{}

static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
{}

static int __usbhsg_ep_set_halt_wedge(struct usb_ep *ep, int halt, int wedge)
{}

static int usbhsg_ep_set_halt(struct usb_ep *ep, int value)
{}

static int usbhsg_ep_set_wedge(struct usb_ep *ep)
{}

static const struct usb_ep_ops usbhsg_ep_ops =;

/*
 *		pullup control
 */
static int usbhsg_can_pullup(struct usbhs_priv *priv)
{}

static void usbhsg_update_pullup(struct usbhs_priv *priv)
{}

/*
 *		usb module start/end
 */
static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
{}

static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
{}

/*
 * VBUS provided by the PHY
 */
static int usbhsm_phy_get_vbus(struct platform_device *pdev)
{}

static void usbhs_mod_phy_mode(struct usbhs_priv *priv)
{}

/*
 *
 *		linux usb function
 *
 */
static int usbhsg_gadget_start(struct usb_gadget *gadget,
		struct usb_gadget_driver *driver)
{}

static int usbhsg_gadget_stop(struct usb_gadget *gadget)
{}

/*
 *		usb gadget ops
 */
static int usbhsg_get_frame(struct usb_gadget *gadget)
{}

static int usbhsg_pullup(struct usb_gadget *gadget, int is_on)
{}

static int usbhsg_set_selfpowered(struct usb_gadget *gadget, int is_self)
{}

static int usbhsg_vbus_session(struct usb_gadget *gadget, int is_active)
{}

static const struct usb_gadget_ops usbhsg_gadget_ops =;

static int usbhsg_start(struct usbhs_priv *priv)
{}

static int usbhsg_stop(struct usbhs_priv *priv)
{}

int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
{}

void usbhs_mod_gadget_remove(struct usbhs_priv *priv)
{}