linux/drivers/usb/dwc3/drd.c

// SPDX-License-Identifier: GPL-2.0
/*
 * drd.c - DesignWare USB3 DRD Controller Dual-role support
 *
 * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com
 *
 * Authors: Roger Quadros <[email protected]>
 */

#include <linux/extcon.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/property.h>

#include "debug.h"
#include "core.h"
#include "gadget.h"

static void dwc3_otg_disable_events(struct dwc3 *dwc, u32 disable_mask)
{}

static void dwc3_otg_enable_events(struct dwc3 *dwc, u32 enable_mask)
{}

static void dwc3_otg_clear_events(struct dwc3 *dwc)
{}

#define DWC3_OTG_ALL_EVENTS

static irqreturn_t dwc3_otg_thread_irq(int irq, void *_dwc)
{}

static irqreturn_t dwc3_otg_irq(int irq, void *_dwc)
{}

static void dwc3_otgregs_init(struct dwc3 *dwc)
{}

static int dwc3_otg_get_irq(struct dwc3 *dwc)
{}

void dwc3_otg_init(struct dwc3 *dwc)
{}

void dwc3_otg_exit(struct dwc3 *dwc)
{}

/* should be called before Host controller driver is started */
void dwc3_otg_host_init(struct dwc3 *dwc)
{}

/* should be called after Host controller driver is stopped */
static void dwc3_otg_host_exit(struct dwc3 *dwc)
{}

/* should be called before the gadget controller driver is started */
static void dwc3_otg_device_init(struct dwc3 *dwc)
{}

/* should be called after the gadget controller driver is stopped */
static void dwc3_otg_device_exit(struct dwc3 *dwc)
{}

void dwc3_otg_update(struct dwc3 *dwc, bool ignore_idstatus)
{}

static void dwc3_drd_update(struct dwc3 *dwc)
{}

static int dwc3_drd_notifier(struct notifier_block *nb,
			     unsigned long event, void *ptr)
{}

#if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
#define ROLE_SWITCH
static int dwc3_usb_role_switch_set(struct usb_role_switch *sw,
				    enum usb_role role)
{}

static enum usb_role dwc3_usb_role_switch_get(struct usb_role_switch *sw)
{}

static int dwc3_setup_role_switch(struct dwc3 *dwc)
{}
#else
#define ROLE_SWITCH
#define dwc3_setup_role_switch
#endif

int dwc3_drd_init(struct dwc3 *dwc)
{}

void dwc3_drd_exit(struct dwc3 *dwc)
{}