#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/fs.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/wilco-ec.h>
#include <linux/platform_device.h>
#define DRV_NAME …
#define FORMATTED_BUFFER_SIZE …
struct wilco_ec_debugfs { … };
static struct wilco_ec_debugfs *debug_info;
static int parse_hex_sentence(const char *in, int isize, u8 *out, int osize)
{ … }
#define TYPE_AND_DATA_SIZE …
static ssize_t raw_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t raw_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{ … }
static const struct file_operations fops_raw = …;
#define CMD_KB_CHROME …
#define SUB_CMD_H1_GPIO …
#define SUB_CMD_TEST_EVENT …
struct ec_request { … } __packed;
struct ec_response { … } __packed;
static int send_ec_cmd(struct wilco_ec_device *ec, u8 sub_cmd, u8 *out_val)
{ … }
static int h1_gpio_get(void *arg, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int test_event_set(void *arg, u64 val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int wilco_ec_debugfs_probe(struct platform_device *pdev)
{ … }
static void wilco_ec_debugfs_remove(struct platform_device *pdev)
{ … }
static const struct platform_device_id wilco_ec_debugfs_id[] = …;
MODULE_DEVICE_TABLE(platform, wilco_ec_debugfs_id);
static struct platform_driver wilco_ec_debugfs_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;