#include <linux/err.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/pm_runtime.h>
#include <linux/mutex.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max8998.h>
#include <linux/mfd/max8998-private.h>
#define RTC_I2C_ADDR …
static const struct mfd_cell max8998_devs[] = …;
static const struct mfd_cell lp3974_devs[] = …;
int max8998_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest)
{ … }
EXPORT_SYMBOL(…);
int max8998_bulk_read(struct i2c_client *i2c, u8 reg, int count, u8 *buf)
{ … }
EXPORT_SYMBOL(…);
int max8998_write_reg(struct i2c_client *i2c, u8 reg, u8 value)
{ … }
EXPORT_SYMBOL(…);
int max8998_bulk_write(struct i2c_client *i2c, u8 reg, int count, u8 *buf)
{ … }
EXPORT_SYMBOL(…);
int max8998_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_OF
static const struct of_device_id max8998_dt_match[] = …;
#endif
static struct max8998_platform_data *max8998_i2c_parse_dt_pdata(
struct device *dev)
{ … }
static int max8998_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id max8998_i2c_id[] = …;
static int max8998_suspend(struct device *dev)
{ … }
static int max8998_resume(struct device *dev)
{ … }
struct max8998_reg_dump { … };
#define SAVE_ITEM(x) …
static struct max8998_reg_dump max8998_dump[] = …;
static int max8998_freeze(struct device *dev)
{ … }
static int max8998_restore(struct device *dev)
{ … }
static const struct dev_pm_ops max8998_pm = …;
static struct i2c_driver max8998_i2c_driver = …;
static int __init max8998_i2c_init(void)
{ … }
subsys_initcall(max8998_i2c_init);