#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/input/touchscreen.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <linux/mfd/stmpe.h>
#define STMPE_REG_INT_STA …
#define STMPE_REG_TSC_CTRL …
#define STMPE_REG_TSC_CFG …
#define STMPE_REG_FIFO_TH …
#define STMPE_REG_FIFO_STA …
#define STMPE_REG_FIFO_SIZE …
#define STMPE_REG_TSC_DATA_XYZ …
#define STMPE_REG_TSC_FRACTION_Z …
#define STMPE_REG_TSC_I_DRIVE …
#define OP_MOD_XYZ …
#define STMPE_TSC_CTRL_TSC_EN …
#define STMPE_FIFO_STA_RESET …
#define STMPE_IRQ_TOUCH_DET …
#define STMPE_TS_NAME …
#define XY_MASK …
struct stmpe_touch { … };
static int __stmpe_reset_fifo(struct stmpe *stmpe)
{ … }
static void stmpe_work(struct work_struct *work)
{ … }
static irqreturn_t stmpe_ts_handler(int irq, void *data)
{ … }
static int stmpe_init_hw(struct stmpe_touch *ts)
{ … }
static int stmpe_ts_open(struct input_dev *dev)
{ … }
static void stmpe_ts_close(struct input_dev *dev)
{ … }
static void stmpe_ts_get_platform_info(struct platform_device *pdev,
struct stmpe_touch *ts)
{ … }
static int stmpe_input_probe(struct platform_device *pdev)
{ … }
static void stmpe_ts_remove(struct platform_device *pdev)
{ … }
static struct platform_driver stmpe_ts_driver = …;
module_platform_driver(…) …;
static const struct of_device_id stmpe_ts_ids[] = …;
MODULE_DEVICE_TABLE(of, stmpe_ts_ids);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;