#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/platform_device.h>
#include <linux/rpmsg.h>
#include <linux/slab.h>
#include "cros_ec.h"
#define EC_MSG_TIMEOUT_MS …
#define HOST_COMMAND_MARK …
#define HOST_EVENT_MARK …
struct cros_ec_rpmsg_response { … };
struct cros_ec_rpmsg { … };
static int cros_ec_cmd_xfer_rpmsg(struct cros_ec_device *ec_dev,
struct cros_ec_command *ec_msg)
{ … }
static int cros_ec_pkt_xfer_rpmsg(struct cros_ec_device *ec_dev,
struct cros_ec_command *ec_msg)
{ … }
static void
cros_ec_rpmsg_host_event_function(struct work_struct *host_event_work)
{ … }
static int cros_ec_rpmsg_callback(struct rpmsg_device *rpdev, void *data,
int len, void *priv, u32 src)
{ … }
static struct rpmsg_endpoint *
cros_ec_rpmsg_create_ept(struct rpmsg_device *rpdev)
{ … }
static int cros_ec_rpmsg_probe(struct rpmsg_device *rpdev)
{ … }
static void cros_ec_rpmsg_remove(struct rpmsg_device *rpdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int cros_ec_rpmsg_suspend(struct device *dev)
{ … }
static int cros_ec_rpmsg_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(cros_ec_rpmsg_pm_ops, cros_ec_rpmsg_suspend,
cros_ec_rpmsg_resume);
static const struct of_device_id cros_ec_rpmsg_of_match[] = …;
MODULE_DEVICE_TABLE(of, cros_ec_rpmsg_of_match);
static struct rpmsg_driver cros_ec_driver_rpmsg = …;
module_rpmsg_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;