#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/input/touchscreen.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_qos.h>
#include <linux/slab.h>
#include <linux/types.h>
#define ST1232_TS_NAME …
#define ST1633_TS_NAME …
#define REG_STATUS …
#define STATUS_NORMAL …
#define STATUS_INIT …
#define STATUS_ERROR …
#define STATUS_AUTO_TUNING …
#define STATUS_IDLE …
#define STATUS_POWER_DOWN …
#define ERROR_NONE …
#define ERROR_INVALID_ADDRESS …
#define ERROR_INVALID_VALUE …
#define ERROR_INVALID_PLATFORM …
#define REG_XY_RESOLUTION …
#define REG_XY_COORDINATES …
#define ST_TS_MAX_FINGERS …
struct st_chip_info { … };
struct st1232_ts_data { … };
static int st1232_ts_read_data(struct st1232_ts_data *ts, u8 reg,
unsigned int n)
{ … }
static int st1232_ts_wait_ready(struct st1232_ts_data *ts)
{ … }
static int st1232_ts_read_resolution(struct st1232_ts_data *ts, u16 *max_x,
u16 *max_y)
{ … }
static int st1232_ts_parse_and_report(struct st1232_ts_data *ts)
{ … }
static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
{ … }
static void st1232_ts_power(struct st1232_ts_data *ts, bool poweron)
{ … }
static void st1232_ts_power_off(void *data)
{ … }
static const struct st_chip_info st1232_chip_info = …;
static const struct st_chip_info st1633_chip_info = …;
static int st1232_ts_probe(struct i2c_client *client)
{ … }
static int st1232_ts_suspend(struct device *dev)
{ … }
static int st1232_ts_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops,
st1232_ts_suspend, st1232_ts_resume);
static const struct i2c_device_id st1232_ts_id[] = …;
MODULE_DEVICE_TABLE(i2c, st1232_ts_id);
static const struct of_device_id st1232_ts_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
static struct i2c_driver st1232_ts_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;