#include <linux/io.h>
#include <linux/of.h>
#include <linux/clk.h>
#include <linux/irq.h>
#include <linux/of_clk.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/extcon.h>
#include <linux/interconnect.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/phy/phy.h>
#include <linux/usb/of.h>
#include <linux/reset.h>
#include <linux/iopoll.h>
#include <linux/usb/hcd.h>
#include <linux/usb.h>
#include "core.h"
#define QSCRATCH_HS_PHY_CTRL …
#define UTMI_OTG_VBUS_VALID …
#define SW_SESSVLD_SEL …
#define QSCRATCH_SS_PHY_CTRL …
#define LANE0_PWR_PRESENT …
#define QSCRATCH_GENERAL_CFG …
#define PIPE_UTMI_CLK_SEL …
#define PIPE3_PHYSTATUS_SW …
#define PIPE_UTMI_CLK_DIS …
#define PWR_EVNT_LPM_IN_L2_MASK …
#define PWR_EVNT_LPM_OUT_L2_MASK …
#define SDM845_QSCRATCH_BASE_OFFSET …
#define SDM845_QSCRATCH_SIZE …
#define SDM845_DWC3_CORE_SIZE …
#define USB_MEMORY_AVG_HS_BW …
#define USB_MEMORY_PEAK_HS_BW …
#define USB_MEMORY_AVG_SS_BW …
#define USB_MEMORY_PEAK_SS_BW …
#define APPS_USB_AVG_BW …
#define APPS_USB_PEAK_BW …
#define DWC3_QCOM_MAX_PORTS …
static const u32 pwr_evnt_irq_stat_reg[DWC3_QCOM_MAX_PORTS] = …;
struct dwc3_qcom_port { … };
struct dwc3_qcom { … };
static inline void dwc3_qcom_setbits(void __iomem *base, u32 offset, u32 val)
{ … }
static inline void dwc3_qcom_clrbits(void __iomem *base, u32 offset, u32 val)
{ … }
static void dwc3_qcom_vbus_override_enable(struct dwc3_qcom *qcom, bool enable)
{ … }
static int dwc3_qcom_vbus_notifier(struct notifier_block *nb,
unsigned long event, void *ptr)
{ … }
static int dwc3_qcom_host_notifier(struct notifier_block *nb,
unsigned long event, void *ptr)
{ … }
static int dwc3_qcom_register_extcon(struct dwc3_qcom *qcom)
{ … }
static int dwc3_qcom_interconnect_enable(struct dwc3_qcom *qcom)
{ … }
static int dwc3_qcom_interconnect_disable(struct dwc3_qcom *qcom)
{ … }
static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
{ … }
static void dwc3_qcom_interconnect_exit(struct dwc3_qcom *qcom)
{ … }
static bool dwc3_qcom_is_host(struct dwc3_qcom *qcom)
{ … }
static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom, int port_index)
{ … }
static void dwc3_qcom_enable_wakeup_irq(int irq, unsigned int polarity)
{ … }
static void dwc3_qcom_disable_wakeup_irq(int irq)
{ … }
static void dwc3_qcom_disable_port_interrupts(struct dwc3_qcom_port *port)
{ … }
static void dwc3_qcom_enable_port_interrupts(struct dwc3_qcom_port *port)
{ … }
static void dwc3_qcom_disable_interrupts(struct dwc3_qcom *qcom)
{ … }
static void dwc3_qcom_enable_interrupts(struct dwc3_qcom *qcom)
{ … }
static int dwc3_qcom_suspend(struct dwc3_qcom *qcom, bool wakeup)
{ … }
static int dwc3_qcom_resume(struct dwc3_qcom *qcom, bool wakeup)
{ … }
static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
{ … }
static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
{ … }
static int dwc3_qcom_request_irq(struct dwc3_qcom *qcom, int irq,
const char *name)
{ … }
static int dwc3_qcom_setup_port_irq(struct platform_device *pdev, int port_index, bool is_multiport)
{ … }
static int dwc3_qcom_find_num_ports(struct platform_device *pdev)
{ … }
static int dwc3_qcom_setup_irq(struct platform_device *pdev)
{ … }
static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count)
{ … }
static int dwc3_qcom_of_register_core(struct platform_device *pdev)
{ … }
static int dwc3_qcom_probe(struct platform_device *pdev)
{ … }
static void dwc3_qcom_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused dwc3_qcom_pm_suspend(struct device *dev)
{ … }
static int __maybe_unused dwc3_qcom_pm_resume(struct device *dev)
{ … }
static int __maybe_unused dwc3_qcom_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused dwc3_qcom_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops dwc3_qcom_dev_pm_ops = …;
static const struct of_device_id dwc3_qcom_of_match[] = …;
MODULE_DEVICE_TABLE(of, dwc3_qcom_of_match);
static struct platform_driver dwc3_qcom_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;