#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/notifier.h>
#include <linux/extcon-provider.h>
#include <linux/regmap.h>
#include <linux/mfd/axp20x.h>
#include <linux/usb/role.h>
#include <linux/workqueue.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/iosf_mbi.h>
#define PS_STAT_VBUS_TRIGGER …
#define PS_STAT_BAT_CHRG_DIR …
#define PS_STAT_VBUS_ABOVE_VHOLD …
#define PS_STAT_VBUS_VALID …
#define PS_STAT_VBUS_PRESENT …
#define BC_GLOBAL_RUN …
#define BC_GLOBAL_DET_STAT …
#define BC_GLOBAL_DBP_TOUT …
#define BC_GLOBAL_VLGC_COM_SEL …
#define BC_GLOBAL_DCD_TOUT_MASK …
#define BC_GLOBAL_DCD_TOUT_300MS …
#define BC_GLOBAL_DCD_TOUT_100MS …
#define BC_GLOBAL_DCD_TOUT_500MS …
#define BC_GLOBAL_DCD_TOUT_900MS …
#define BC_GLOBAL_DCD_DET_SEL …
#define VBUS_CNTL_DPDM_PD_EN …
#define VBUS_CNTL_DPDM_FD_EN …
#define VBUS_CNTL_FIRST_PO_STAT …
#define USB_STAT_BUS_STAT_MASK …
#define USB_STAT_BUS_STAT_SHIFT …
#define USB_STAT_BUS_STAT_ATHD …
#define USB_STAT_BUS_STAT_CONN …
#define USB_STAT_BUS_STAT_SUSP …
#define USB_STAT_BUS_STAT_CONF …
#define USB_STAT_USB_SS_MODE …
#define USB_STAT_DEAD_BAT_DET …
#define USB_STAT_DBP_UNCFG …
#define DET_STAT_MASK …
#define DET_STAT_SHIFT …
#define DET_STAT_SDP …
#define DET_STAT_CDP …
#define DET_STAT_DCP …
enum axp288_extcon_reg { … };
enum axp288_extcon_irq { … };
static const unsigned int axp288_extcon_cables[] = …;
struct axp288_extcon_info { … };
static const struct x86_cpu_id cherry_trail_cpu_ids[] = …;
static const char * const axp288_pwr_up_down_info[] = …;
static void axp288_extcon_log_rsi(struct axp288_extcon_info *info)
{ … }
static bool axp288_get_id_pin(struct axp288_extcon_info *info)
{ … }
static void axp288_usb_role_work(struct work_struct *work)
{ … }
static bool axp288_get_vbus_attach(struct axp288_extcon_info *info)
{ … }
static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
{ … }
static int axp288_extcon_id_evt(struct notifier_block *nb,
unsigned long event, void *param)
{ … }
static irqreturn_t axp288_extcon_isr(int irq, void *data)
{ … }
static int axp288_extcon_enable(struct axp288_extcon_info *info)
{ … }
static void axp288_put_role_sw(void *data)
{ … }
static int axp288_extcon_find_role_sw(struct axp288_extcon_info *info)
{ … }
static int axp288_extcon_probe(struct platform_device *pdev)
{ … }
static int __maybe_unused axp288_extcon_suspend(struct device *dev)
{ … }
static int __maybe_unused axp288_extcon_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(axp288_extcon_pm_ops, axp288_extcon_suspend,
axp288_extcon_resume);
static const struct platform_device_id axp288_extcon_table[] = …;
MODULE_DEVICE_TABLE(platform, axp288_extcon_table);
static struct platform_driver axp288_extcon_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;