#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/extcon-provider.h>
#include "extcon-rt8973a.h"
#define DELAY_MS_DEFAULT …
struct muic_irq { … };
struct reg_data { … };
struct rt8973a_muic_info { … };
static struct reg_data rt8973a_reg_data[] = …;
static const unsigned int rt8973a_extcon_cable[] = …;
enum rt8973a_event_type { … };
enum rt8973a_muic_acc_type { … };
static struct muic_irq rt8973a_muic_irqs[] = …;
static const struct regmap_irq rt8973a_irqs[] = …;
static const struct regmap_irq_chip rt8973a_muic_irq_chip = …;
static bool rt8973a_muic_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rt8973a_muic_regmap_config = …;
static int rt8973a_muic_set_path(struct rt8973a_muic_info *info,
unsigned int con_sw, bool attached)
{ … }
static int rt8973a_muic_get_cable_type(struct rt8973a_muic_info *info)
{ … }
static int rt8973a_muic_cable_handler(struct rt8973a_muic_info *info,
enum rt8973a_event_type event)
{ … }
static void rt8973a_muic_irq_work(struct work_struct *work)
{ … }
static irqreturn_t rt8973a_muic_irq_handler(int irq, void *data)
{ … }
static void rt8973a_muic_detect_cable_wq(struct work_struct *work)
{ … }
static void rt8973a_init_dev_type(struct rt8973a_muic_info *info)
{ … }
static int rt8973a_muic_i2c_probe(struct i2c_client *i2c)
{ … }
static void rt8973a_muic_i2c_remove(struct i2c_client *i2c)
{ … }
static const struct of_device_id rt8973a_dt_match[] = …;
MODULE_DEVICE_TABLE(of, rt8973a_dt_match);
#ifdef CONFIG_PM_SLEEP
static int rt8973a_muic_suspend(struct device *dev)
{ … }
static int rt8973a_muic_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(rt8973a_muic_pm_ops,
rt8973a_muic_suspend, rt8973a_muic_resume);
static const struct i2c_device_id rt8973a_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, rt8973a_i2c_id);
static struct i2c_driver rt8973a_muic_i2c_driver = …;
static int __init rt8973a_muic_i2c_init(void)
{ … }
subsys_initcall(rt8973a_muic_i2c_init);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;