linux/drivers/usb/roles/intel-xhci-usb-role-switch.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Intel XHCI (Cherry Trail, Broxton and others) USB OTG role switch driver
 *
 * Copyright (c) 2016-2017 Hans de Goede <[email protected]>
 *
 * Loosely based on android x86 kernel code which is:
 *
 * Copyright (C) 2014 Intel Corp.
 *
 * Author: Wu, Hao
 */

#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/usb/role.h>

/* register definition */
#define DUAL_ROLE_CFG0
#define SW_VBUS_VALID
#define SW_IDPIN_EN
#define SW_IDPIN
#define SW_SWITCH_EN

#define DRD_CONFIG_DYNAMIC
#define DRD_CONFIG_STATIC_HOST
#define DRD_CONFIG_STATIC_DEVICE
#define DRD_CONFIG_MASK

#define DUAL_ROLE_CFG1
#define HOST_MODE

#define DUAL_ROLE_CFG1_POLL_TIMEOUT

#define DRV_NAME

struct intel_xhci_usb_data {};

static const struct software_node intel_xhci_usb_node =;

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

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

static int intel_xhci_usb_probe(struct platform_device *pdev)
{}

static void intel_xhci_usb_remove(struct platform_device *pdev)
{}

static const struct platform_device_id intel_xhci_usb_table[] =;
MODULE_DEVICE_TABLE(platform, intel_xhci_usb_table);

static struct platform_driver intel_xhci_usb_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();