linux/drivers/usb/mtu3/mtu3_dr.c

// SPDX-License-Identifier: GPL-2.0
/*
 * mtu3_dr.c - dual role switch and host glue layer
 *
 * Copyright (C) 2016 MediaTek Inc.
 *
 * Author: Chunfeng Yun <[email protected]>
 */

#include "mtu3.h"
#include "mtu3_dr.h"
#include "mtu3_debug.h"

#define USB2_PORT
#define USB3_PORT

static inline struct ssusb_mtk *otg_sx_to_ssusb(struct otg_switch_mtk *otg_sx)
{}

static void toggle_opstate(struct ssusb_mtk *ssusb)
{}

/* only port0 supports dual-role mode */
static int ssusb_port0_switch(struct ssusb_mtk *ssusb,
	int version, bool tohost)
{}

static void switch_port_to_host(struct ssusb_mtk *ssusb)
{}

static void switch_port_to_device(struct ssusb_mtk *ssusb)
{}

int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on)
{}

static void ssusb_mode_sw_work(struct work_struct *work)
{}

static void ssusb_set_mode(struct otg_switch_mtk *otg_sx, enum usb_role role)
{}

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

static int ssusb_extcon_register(struct otg_switch_mtk *otg_sx)
{}

/*
 * We provide an interface via debugfs to switch between host and device modes
 * depending on user input.
 * This is useful in special cases, such as uses TYPE-A receptacle but also
 * wants to support dual-role mode.
 */
void ssusb_mode_switch(struct ssusb_mtk *ssusb, int to_host)
{}

void ssusb_set_force_mode(struct ssusb_mtk *ssusb,
			  enum mtu3_dr_force_mode mode)
{}

static int ssusb_role_sw_set(struct usb_role_switch *sw, enum usb_role role)
{}

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

static int ssusb_role_sw_register(struct otg_switch_mtk *otg_sx)
{}

int ssusb_otg_switch_init(struct ssusb_mtk *ssusb)
{}

void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb)
{}