#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/input/touchscreen.h>
#include <linux/module.h>
#include <linux/of.h>
#define ICN8318_REG_POWER …
#define ICN8318_REG_TOUCHDATA …
#define ICN8318_POWER_ACTIVE …
#define ICN8318_POWER_MONITOR …
#define ICN8318_POWER_HIBERNATE …
#define ICN8318_MAX_TOUCHES …
struct icn8318_touch { … } __packed;
struct icn8318_touch_data { … } __packed;
struct icn8318_data { … };
static int icn8318_read_touch_data(struct i2c_client *client,
struct icn8318_touch_data *touch_data)
{ … }
static inline bool icn8318_touch_active(u8 event)
{ … }
static irqreturn_t icn8318_irq(int irq, void *dev_id)
{ … }
static int icn8318_start(struct input_dev *dev)
{ … }
static void icn8318_stop(struct input_dev *dev)
{ … }
static int icn8318_suspend(struct device *dev)
{ … }
static int icn8318_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(icn8318_pm_ops, icn8318_suspend, icn8318_resume);
static int icn8318_probe(struct i2c_client *client)
{ … }
static const struct of_device_id icn8318_of_match[] = …;
MODULE_DEVICE_TABLE(of, icn8318_of_match);
static const struct i2c_device_id icn8318_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, icn8318_i2c_id);
static struct i2c_driver icn8318_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;