#include <linux/clk.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <linux/list.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/acpi.h>
#include <linux/pinctrl/consumer.h>
#include <linux/reset.h>
#include <linux/bitfield.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb/of.h>
#include <linux/usb/otg.h>
#include "core.h"
#include "gadget.h"
#include "io.h"
#include "debug.h"
#include "../host/xhci-ext-caps.h"
#define DWC3_DEFAULT_AUTOSUSPEND_DELAY …
static int dwc3_get_dr_mode(struct dwc3 *dwc)
{ … }
void dwc3_enable_susphy(struct dwc3 *dwc, bool enable)
{ … }
void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode)
{ … }
static void __dwc3_set_mode(struct work_struct *work)
{ … }
void dwc3_set_mode(struct dwc3 *dwc, u32 mode)
{ … }
u32 dwc3_core_fifo_space(struct dwc3_ep *dep, u8 type)
{ … }
int dwc3_core_soft_reset(struct dwc3 *dwc)
{ … }
static void dwc3_frame_length_adjustment(struct dwc3 *dwc)
{ … }
static void dwc3_ref_clk_period(struct dwc3 *dwc)
{ … }
static void dwc3_free_one_event_buffer(struct dwc3 *dwc,
struct dwc3_event_buffer *evt)
{ … }
static struct dwc3_event_buffer *dwc3_alloc_one_event_buffer(struct dwc3 *dwc,
unsigned int length)
{ … }
static void dwc3_free_event_buffers(struct dwc3 *dwc)
{ … }
static int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned int length)
{ … }
int dwc3_event_buffers_setup(struct dwc3 *dwc)
{ … }
void dwc3_event_buffers_cleanup(struct dwc3 *dwc)
{ … }
static void dwc3_core_num_eps(struct dwc3 *dwc)
{ … }
static void dwc3_cache_hwparams(struct dwc3 *dwc)
{ … }
static void dwc3_config_soc_bus(struct dwc3 *dwc)
{ … }
static int dwc3_core_ulpi_init(struct dwc3 *dwc)
{ … }
static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
{ … }
static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
{ … }
static int dwc3_phy_setup(struct dwc3 *dwc)
{ … }
static int dwc3_phy_init(struct dwc3 *dwc)
{ … }
static void dwc3_phy_exit(struct dwc3 *dwc)
{ … }
static int dwc3_phy_power_on(struct dwc3 *dwc)
{ … }
static void dwc3_phy_power_off(struct dwc3 *dwc)
{ … }
static int dwc3_clk_enable(struct dwc3 *dwc)
{ … }
static void dwc3_clk_disable(struct dwc3 *dwc)
{ … }
static void dwc3_core_exit(struct dwc3 *dwc)
{ … }
static bool dwc3_core_is_valid(struct dwc3 *dwc)
{ … }
static void dwc3_core_setup_global_control(struct dwc3 *dwc)
{ … }
static int dwc3_core_get_phy(struct dwc3 *dwc);
static int dwc3_core_ulpi_init(struct dwc3 *dwc);
static void dwc3_set_incr_burst_type(struct dwc3 *dwc)
{ … }
static void dwc3_set_power_down_clk_scale(struct dwc3 *dwc)
{ … }
static void dwc3_config_threshold(struct dwc3 *dwc)
{ … }
static int dwc3_core_init(struct dwc3 *dwc)
{ … }
static int dwc3_core_get_phy(struct dwc3 *dwc)
{ … }
static int dwc3_core_init_mode(struct dwc3 *dwc)
{ … }
static void dwc3_core_exit_mode(struct dwc3 *dwc)
{ … }
static void dwc3_get_software_properties(struct dwc3 *dwc)
{ … }
static void dwc3_get_properties(struct dwc3 *dwc)
{ … }
bool dwc3_has_imod(struct dwc3 *dwc)
{ … }
static void dwc3_check_params(struct dwc3 *dwc)
{ … }
static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
{ … }
static int dwc3_get_clocks(struct dwc3 *dwc)
{ … }
static int dwc3_get_num_ports(struct dwc3 *dwc)
{ … }
static int dwc3_probe(struct platform_device *pdev)
{ … }
static void dwc3_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int dwc3_core_init_for_resume(struct dwc3 *dwc)
{ … }
static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
{ … }
static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg)
{ … }
static int dwc3_runtime_checks(struct dwc3 *dwc)
{ … }
static int dwc3_runtime_suspend(struct device *dev)
{ … }
static int dwc3_runtime_resume(struct device *dev)
{ … }
static int dwc3_runtime_idle(struct device *dev)
{ … }
#endif
#ifdef CONFIG_PM_SLEEP
static int dwc3_suspend(struct device *dev)
{ … }
static int dwc3_resume(struct device *dev)
{ … }
static void dwc3_complete(struct device *dev)
{ … }
#else
#define dwc3_complete …
#endif
static const struct dev_pm_ops dwc3_dev_pm_ops = …;
#ifdef CONFIG_OF
static const struct of_device_id of_dwc3_match[] = …;
MODULE_DEVICE_TABLE(of, of_dwc3_match);
#endif
#ifdef CONFIG_ACPI
#define ACPI_ID_INTEL_BSW …
static const struct acpi_device_id dwc3_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, dwc3_acpi_match);
#endif
static struct platform_driver dwc3_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;