#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/mfd/core.h>
#include <linux/mfd/aat2870.h>
#include <linux/regulator/machine.h>
static struct aat2870_register aat2870_regs[AAT2870_REG_NUM] = …;
static struct mfd_cell aat2870_devs[] = …;
static int __aat2870_read(struct aat2870_data *aat2870, u8 addr, u8 *val)
{ … }
static int __aat2870_write(struct aat2870_data *aat2870, u8 addr, u8 val)
{ … }
static int aat2870_read(struct aat2870_data *aat2870, u8 addr, u8 *val)
{ … }
static int aat2870_write(struct aat2870_data *aat2870, u8 addr, u8 val)
{ … }
static int aat2870_update(struct aat2870_data *aat2870, u8 addr, u8 mask,
u8 val)
{ … }
static inline void aat2870_enable(struct aat2870_data *aat2870)
{ … }
static inline void aat2870_disable(struct aat2870_data *aat2870)
{ … }
#ifdef CONFIG_DEBUG_FS
static ssize_t aat2870_dump_reg(struct aat2870_data *aat2870, char *buf)
{ … }
static ssize_t aat2870_reg_read_file(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t aat2870_reg_write_file(struct file *file,
const char __user *user_buf, size_t count,
loff_t *ppos)
{ … }
static const struct file_operations aat2870_reg_fops = …;
static void aat2870_init_debugfs(struct aat2870_data *aat2870)
{ … }
#else
static inline void aat2870_init_debugfs(struct aat2870_data *aat2870)
{
}
#endif
static int aat2870_i2c_probe(struct i2c_client *client)
{ … }
static int aat2870_i2c_suspend(struct device *dev)
{ … }
static int aat2870_i2c_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(aat2870_pm_ops, aat2870_i2c_suspend,
aat2870_i2c_resume);
static const struct i2c_device_id aat2870_i2c_id_table[] = …;
static struct i2c_driver aat2870_i2c_driver = …;
static int __init aat2870_init(void)
{ … }
subsys_initcall(aat2870_init);