linux/drivers/usb/fotg210/fotg210-core.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Central probing code for the FOTG210 dual role driver
 * We register one driver for the hardware and then we decide
 * whether to proceed with probing the host or the peripheral
 * driver.
 */
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/usb.h>
#include <linux/usb/otg.h>

#include "fotg210.h"

/* Role Register 0x80 */
#define FOTG210_RR
#define FOTG210_RR_ID
#define FOTG210_RR_CROLE

/*
 * Gemini-specific initialization function, only executed on the
 * Gemini SoC using the global misc control register.
 *
 * The gemini USB blocks are connected to either Mini-A (host mode) or
 * Mini-B (peripheral mode) plugs. There is no role switch support on the
 * Gemini SoC, just either-or.
 */
#define GEMINI_GLOBAL_MISC_CTRL
#define GEMINI_MISC_USB0_WAKEUP
#define GEMINI_MISC_USB1_WAKEUP
#define GEMINI_MISC_USB0_VBUS_ON
#define GEMINI_MISC_USB1_VBUS_ON
#define GEMINI_MISC_USB0_MINI_B
#define GEMINI_MISC_USB1_MINI_B

static int fotg210_gemini_init(struct fotg210 *fotg, struct resource *res,
			       enum usb_dr_mode mode)
{}

/**
 * fotg210_vbus() - Called by gadget driver to enable/disable VBUS
 * @fotg: pointer to a private fotg210 object
 * @enable: true to enable VBUS, false to disable VBUS
 */
void fotg210_vbus(struct fotg210 *fotg, bool enable)
{}

static int fotg210_probe(struct platform_device *pdev)
{}

static void fotg210_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_OF
static const struct of_device_id fotg210_of_match[] =;
MODULE_DEVICE_TABLE(of, fotg210_of_match);
#endif

static struct platform_driver fotg210_driver =;

static int __init fotg210_init(void)
{}
module_init();

static void __exit fotg210_cleanup(void)
{}
module_exit(fotg210_cleanup);

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