#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/mfd/core.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
#define A500_EC_I2C_ERR_TIMEOUT …
#define A500_EC_POWER_CMD_TIMEOUT …
#define CMD_SHUTDOWN …
#define CMD_WARM_REBOOT …
#define CMD_COLD_REBOOT …
enum { … };
static struct i2c_client *a500_ec_client_pm_off;
static int a500_ec_read(void *context, const void *reg_buf, size_t reg_size,
void *val_buf, size_t val_sizel)
{ … }
static int a500_ec_write(void *context, const void *data, size_t count)
{ … }
static const struct regmap_config a500_ec_regmap_config = …;
static const struct regmap_bus a500_ec_regmap_bus = …;
static void a500_ec_poweroff(void)
{ … }
static int a500_ec_restart_notify(struct notifier_block *this,
unsigned long reboot_mode, void *data)
{ … }
static struct notifier_block a500_ec_restart_handler = …;
static const struct mfd_cell a500_ec_cells[] = …;
static int a500_ec_probe(struct i2c_client *client)
{ … }
static void a500_ec_remove(struct i2c_client *client)
{ … }
static const struct of_device_id a500_ec_match[] = …;
MODULE_DEVICE_TABLE(of, a500_ec_match);
static struct i2c_driver a500_ec_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;