#include <linux/err.h>
#include <linux/i2c.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-sm5502.h"
#define DELAY_MS_DEFAULT …
struct muic_irq { … };
struct reg_data { … };
struct sm5502_muic_info { … };
struct sm5502_type { … };
static struct reg_data sm5502_reg_data[] = …;
static struct reg_data sm5504_reg_data[] = …;
static const unsigned int sm5502_extcon_cable[] = …;
enum sm5502_muic_acc_type { … };
static struct muic_irq sm5502_muic_irqs[] = …;
static const struct regmap_irq sm5502_irqs[] = …;
static const struct regmap_irq_chip sm5502_muic_irq_chip = …;
static struct muic_irq sm5504_muic_irqs[] = …;
static const struct regmap_irq sm5504_irqs[] = …;
static const struct regmap_irq_chip sm5504_muic_irq_chip = …;
static bool sm5502_muic_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config sm5502_muic_regmap_config = …;
static int sm5502_muic_set_path(struct sm5502_muic_info *info,
unsigned int con_sw, unsigned int vbus_sw,
bool attached)
{ … }
static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
{ … }
static int sm5502_muic_cable_handler(struct sm5502_muic_info *info,
bool attached)
{ … }
static void sm5502_muic_irq_work(struct work_struct *work)
{ … }
static int sm5502_parse_irq(struct sm5502_muic_info *info, int irq_type)
{ … }
static int sm5504_parse_irq(struct sm5502_muic_info *info, int irq_type)
{ … }
static irqreturn_t sm5502_muic_irq_handler(int irq, void *data)
{ … }
static void sm5502_muic_detect_cable_wq(struct work_struct *work)
{ … }
static void sm5502_init_dev_type(struct sm5502_muic_info *info)
{ … }
static int sm5022_muic_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct sm5502_type sm5502_data = …;
static const struct sm5502_type sm5504_data = …;
static const struct of_device_id sm5502_dt_match[] = …;
MODULE_DEVICE_TABLE(of, sm5502_dt_match);
#ifdef CONFIG_PM_SLEEP
static int sm5502_muic_suspend(struct device *dev)
{ … }
static int sm5502_muic_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(sm5502_muic_pm_ops,
sm5502_muic_suspend, sm5502_muic_resume);
static const struct i2c_device_id sm5502_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, sm5502_i2c_id);
static struct i2c_driver sm5502_muic_i2c_driver = …;
static int __init sm5502_muic_i2c_init(void)
{ … }
subsys_initcall(sm5502_muic_i2c_init);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;