#include <linux/extcon-provider.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/pinctrl/consumer.h>
#include <linux/mod_devicetable.h>
#define USB_GPIO_DEBOUNCE_MS …
struct usb_extcon_info { … };
static const unsigned int usb_extcon_cable[] = …;
static void usb_extcon_detect_cable(struct work_struct *work)
{ … }
static irqreturn_t usb_irq_handler(int irq, void *dev_id)
{ … }
static int usb_extcon_probe(struct platform_device *pdev)
{ … }
static void usb_extcon_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int usb_extcon_suspend(struct device *dev)
{ … }
static int usb_extcon_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(usb_extcon_pm_ops,
usb_extcon_suspend, usb_extcon_resume);
static const struct of_device_id usb_extcon_dt_match[] = …;
MODULE_DEVICE_TABLE(of, usb_extcon_dt_match);
static const struct platform_device_id usb_extcon_platform_ids[] = …;
MODULE_DEVICE_TABLE(platform, usb_extcon_platform_ids);
static struct platform_driver usb_extcon_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;