#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include "cros_ec.h"
struct ec_host_request_i2c { … } __packed;
struct ec_host_response_i2c { … } __packed;
static inline struct cros_ec_device *to_ec_dev(struct device *dev)
{ … }
static int cros_ec_pkt_xfer_i2c(struct cros_ec_device *ec_dev,
struct cros_ec_command *msg)
{ … }
static int cros_ec_cmd_xfer_i2c(struct cros_ec_device *ec_dev,
struct cros_ec_command *msg)
{ … }
static int cros_ec_i2c_probe(struct i2c_client *client)
{ … }
static void cros_ec_i2c_remove(struct i2c_client *client)
{ … }
#ifdef CONFIG_PM_SLEEP
static int cros_ec_i2c_suspend(struct device *dev)
{ … }
static int cros_ec_i2c_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops cros_ec_i2c_pm_ops = …;
#ifdef CONFIG_OF
static const struct of_device_id cros_ec_i2c_of_match[] = …;
MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match);
#endif
static const struct i2c_device_id cros_ec_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id cros_ec_i2c_acpi_id[] = …;
MODULE_DEVICE_TABLE(acpi, cros_ec_i2c_acpi_id);
#endif
static struct i2c_driver cros_ec_driver = …;
module_i2c_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;