#include <linux/module.h>
#include <linux/hrtimer.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/input/mt.h>
#include <linux/input/touchscreen.h>
#include <linux/platform_data/zforce_ts.h>
#include <linux/regulator/consumer.h>
#include <linux/of.h>
#define WAIT_TIMEOUT …
#define FRAME_START …
#define FRAME_MAXSIZE …
#define PAYLOAD_HEADER …
#define PAYLOAD_LENGTH …
#define PAYLOAD_BODY …
#define RESPONSE_ID …
#define RESPONSE_DATA …
#define COMMAND_DEACTIVATE …
#define COMMAND_INITIALIZE …
#define COMMAND_RESOLUTION …
#define COMMAND_SETCONFIG …
#define COMMAND_DATAREQUEST …
#define COMMAND_SCANFREQ …
#define COMMAND_STATUS …
#define RESPONSE_DEACTIVATE …
#define RESPONSE_INITIALIZE …
#define RESPONSE_RESOLUTION …
#define RESPONSE_SETCONFIG …
#define RESPONSE_SCANFREQ …
#define RESPONSE_STATUS …
#define NOTIFICATION_TOUCH …
#define NOTIFICATION_BOOTCOMPLETE …
#define NOTIFICATION_OVERRUN …
#define NOTIFICATION_PROXIMITY …
#define NOTIFICATION_INVALID_COMMAND …
#define ZFORCE_REPORT_POINTS …
#define ZFORCE_MAX_AREA …
#define STATE_DOWN …
#define STATE_MOVE …
#define STATE_UP …
#define SETCONFIG_DUALTOUCH …
struct zforce_point { … };
struct zforce_ts { … };
static int zforce_command(struct zforce_ts *ts, u8 cmd)
{ … }
static void zforce_reset_assert(struct zforce_ts *ts)
{ … }
static void zforce_reset_deassert(struct zforce_ts *ts)
{ … }
static int zforce_send_wait(struct zforce_ts *ts, const char *buf, int len)
{ … }
static int zforce_command_wait(struct zforce_ts *ts, u8 cmd)
{ … }
static int zforce_resolution(struct zforce_ts *ts, u16 x, u16 y)
{ … }
static int zforce_scan_frequency(struct zforce_ts *ts, u16 idle, u16 finger,
u16 stylus)
{ … }
static int zforce_setconfig(struct zforce_ts *ts, char b1)
{ … }
static int zforce_start(struct zforce_ts *ts)
{ … }
static int zforce_stop(struct zforce_ts *ts)
{ … }
static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
{ … }
static int zforce_read_packet(struct zforce_ts *ts, u8 *buf)
{ … }
static void zforce_complete(struct zforce_ts *ts, int cmd, int result)
{ … }
static irqreturn_t zforce_irq(int irq, void *dev_id)
{ … }
static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
{ … }
static int zforce_input_open(struct input_dev *dev)
{ … }
static void zforce_input_close(struct input_dev *dev)
{ … }
static int zforce_suspend(struct device *dev)
{ … }
static int zforce_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(zforce_pm_ops, zforce_suspend, zforce_resume);
static void zforce_reset(void *data)
{ … }
static struct zforce_ts_platdata *zforce_parse_dt(struct device *dev)
{ … }
static int zforce_probe(struct i2c_client *client)
{ … }
static struct i2c_device_id zforce_idtable[] = …;
MODULE_DEVICE_TABLE(i2c, zforce_idtable);
#ifdef CONFIG_OF
static const struct of_device_id zforce_dt_idtable[] = …;
MODULE_DEVICE_TABLE(of, zforce_dt_idtable);
#endif
static struct i2c_driver zforce_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;