#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/regmap.h>
#define REG_OFFSET_MASK …
#define REG_ADDR_MASK …
#define REG_ADDR_SHIFT …
#define CHT_WC_IRQLVL1 …
#define CHT_WC_IRQLVL1_MASK …
#define CHT_WC_HRV …
enum { … };
static const struct resource cht_wc_pwrsrc_resources[] = …;
static const struct resource cht_wc_ext_charger_resources[] = …;
static struct mfd_cell cht_wc_dev[] = …;
static int cht_wc_byte_reg_read(void *context, unsigned int reg,
unsigned int *val)
{ … }
static int cht_wc_byte_reg_write(void *context, unsigned int reg,
unsigned int val)
{ … }
static const struct regmap_config cht_wc_regmap_cfg = …;
static const struct regmap_irq cht_wc_regmap_irqs[] = …;
static const struct regmap_irq_chip cht_wc_regmap_irq_chip = …;
static const struct dmi_system_id cht_wc_model_dmi_ids[] = …;
static int cht_wc_probe(struct i2c_client *client)
{ … }
static void cht_wc_shutdown(struct i2c_client *client)
{ … }
static int cht_wc_suspend(struct device *dev)
{ … }
static int cht_wc_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(cht_wc_pm_ops, cht_wc_suspend, cht_wc_resume);
static const struct i2c_device_id cht_wc_i2c_id[] = …;
static const struct acpi_device_id cht_wc_acpi_ids[] = …;
static struct i2c_driver cht_wc_driver = …;
builtin_i2c_driver(…) …;