#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/mfd/core.h>
#include <linux/module.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
enum { … };
enum { … };
struct kb3930 { … };
static struct kb3930 *kb3930_power_off;
#define EC_GPIO_WAVE …
#define EC_GPIO_OFF_MODE …
#define EC_OFF_MODE_REBOOT …
#define EC_OFF_MODE_POWER …
static void kb3930_off(struct kb3930 *ddata, int off_mode)
{ … }
static int kb3930_restart(struct notifier_block *this,
unsigned long mode, void *cmd)
{ … }
static void kb3930_pm_power_off(void)
{ … }
static struct notifier_block kb3930_restart_nb = …;
static const struct mfd_cell ariel_ec_cells[] = …;
static int kb3930_ec_ram_reg_write(void *context, unsigned int reg,
unsigned int val)
{ … }
static int kb3930_ec_ram_reg_read(void *context, unsigned int reg,
unsigned int *val)
{ … }
static const struct regmap_config kb3930_ram_regmap_config = …;
static int kb3930_probe(struct i2c_client *client)
{ … }
static void kb3930_remove(struct i2c_client *client)
{ … }
static const struct of_device_id kb3930_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, kb3930_dt_ids);
static struct i2c_driver kb3930_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;