#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/delay.h>
#define CHIP_ID …
#define QT1070_CHIP_ID …
#define FW_VERSION …
#define QT1070_FW_VERSION …
#define DET_STATUS …
#define KEY_STATUS …
#define CALIBRATE_CMD …
#define QT1070_CAL_TIME …
#define RESET …
#define QT1070_RESET_TIME …
static const unsigned short qt1070_key2code[] = …;
struct qt1070_data { … };
static int qt1070_read(struct i2c_client *client, u8 reg)
{ … }
static int qt1070_write(struct i2c_client *client, u8 reg, u8 data)
{ … }
static bool qt1070_identify(struct i2c_client *client)
{ … }
static irqreturn_t qt1070_interrupt(int irq, void *dev_id)
{ … }
static int qt1070_probe(struct i2c_client *client)
{ … }
static int qt1070_suspend(struct device *dev)
{ … }
static int qt1070_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume);
static const struct i2c_device_id qt1070_id[] = …;
MODULE_DEVICE_TABLE(i2c, qt1070_id);
#ifdef CONFIG_OF
static const struct of_device_id qt1070_of_match[] = …;
MODULE_DEVICE_TABLE(of, qt1070_of_match);
#endif
static struct i2c_driver qt1070_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;