linux/drivers/usb/gadget/udc/bdc/bdc_udc.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * bdc_udc.c - BRCM BDC USB3.0 device controller gagdet ops
 *
 * Copyright (C) 2014 Broadcom Corporation
 *
 * Author: Ashwini Pahuja
 *
 * Based on drivers under drivers/usb/gadget/udc/
 */
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/list.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
#include <linux/device.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb/otg.h>
#include <linux/pm.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/unaligned.h>
#include <linux/platform_device.h>

#include "bdc.h"
#include "bdc_ep.h"
#include "bdc_cmd.h"
#include "bdc_dbg.h"

static const struct usb_gadget_ops bdc_gadget_ops;

static const char * const conn_speed_str[] =;

/* EP0 initial descripror */
static struct usb_endpoint_descriptor bdc_gadget_ep0_desc =;

/* Advance the srr dqp maintained by SW */
static void srr_dqp_index_advc(struct bdc *bdc, u32 srr_num)
{}

/* connect sr */
static void bdc_uspc_connected(struct bdc *bdc)
{}

/* device got disconnected */
static void bdc_uspc_disconnected(struct bdc *bdc, bool reinit)
{}

/* TNotify wkaeup timer */
static void bdc_func_wake_timer(struct work_struct *work)
{}

/* handler for Link state change condition */
static void handle_link_state_change(struct bdc *bdc, u32 uspc)
{}

/* something changes on upstream port, handle it here */
void bdc_sr_uspc(struct bdc *bdc, struct bdc_sr *sreport)
{}

/* Main interrupt handler for bdc */
static irqreturn_t bdc_udc_interrupt(int irq, void *_bdc)
{}

/* Gadget ops */
static int bdc_udc_start(struct usb_gadget *gadget,
				struct usb_gadget_driver *driver)
{}

static int bdc_udc_stop(struct usb_gadget *gadget)
{}

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

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

static int bdc_udc_wakeup(struct usb_gadget *gadget)
{}

static const struct usb_gadget_ops bdc_gadget_ops =;

/* Init the gadget interface and register the udc */
int bdc_udc_init(struct bdc *bdc)
{}

void bdc_udc_exit(struct bdc *bdc)
{}