#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/firmware.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/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/unaligned.h>
#define IQS5XX_FW_FILE_LEN …
#define IQS5XX_NUM_RETRIES …
#define IQS5XX_NUM_CONTACTS …
#define IQS5XX_WR_BYTES_MAX …
#define IQS5XX_PROD_NUM_IQS550 …
#define IQS5XX_PROD_NUM_IQS572 …
#define IQS5XX_PROD_NUM_IQS525 …
#define IQS5XX_SHOW_RESET …
#define IQS5XX_ACK_RESET …
#define IQS5XX_SUSPEND …
#define IQS5XX_RESUME …
#define IQS5XX_SETUP_COMPLETE …
#define IQS5XX_WDT …
#define IQS5XX_ALP_REATI …
#define IQS5XX_REATI …
#define IQS5XX_TP_EVENT …
#define IQS5XX_EVENT_MODE …
#define IQS5XX_PROD_NUM …
#define IQS5XX_SYS_INFO0 …
#define IQS5XX_SYS_INFO1 …
#define IQS5XX_SYS_CTRL0 …
#define IQS5XX_SYS_CTRL1 …
#define IQS5XX_SYS_CFG0 …
#define IQS5XX_SYS_CFG1 …
#define IQS5XX_X_RES …
#define IQS5XX_Y_RES …
#define IQS5XX_EXP_FILE …
#define IQS5XX_CHKSM …
#define IQS5XX_APP …
#define IQS5XX_CSTM …
#define IQS5XX_PMAP_END …
#define IQS5XX_END_COMM …
#define IQS5XX_CHKSM_LEN …
#define IQS5XX_APP_LEN …
#define IQS5XX_CSTM_LEN …
#define IQS5XX_PMAP_LEN …
#define IQS5XX_REC_HDR_LEN …
#define IQS5XX_REC_LEN_MAX …
#define IQS5XX_REC_TYPE_DATA …
#define IQS5XX_REC_TYPE_EOF …
#define IQS5XX_BL_ADDR_MASK …
#define IQS5XX_BL_CMD_VER …
#define IQS5XX_BL_CMD_READ …
#define IQS5XX_BL_CMD_EXEC …
#define IQS5XX_BL_CMD_CRC …
#define IQS5XX_BL_BLK_LEN_MAX …
#define IQS5XX_BL_ID …
#define IQS5XX_BL_STATUS_NONE …
#define IQS5XX_BL_CRC_PASS …
#define IQS5XX_BL_CRC_FAIL …
#define IQS5XX_BL_ATTEMPTS …
struct iqs5xx_dev_id_info { … } __packed;
struct iqs5xx_ihex_rec { … } __packed;
struct iqs5xx_touch_data { … } __packed;
struct iqs5xx_status { … } __packed;
struct iqs5xx_private { … };
static int iqs5xx_read_burst(struct i2c_client *client,
u16 reg, void *val, u16 len)
{ … }
static int iqs5xx_read_word(struct i2c_client *client, u16 reg, u16 *val)
{ … }
static int iqs5xx_write_burst(struct i2c_client *client,
u16 reg, const void *val, u16 len)
{ … }
static int iqs5xx_write_word(struct i2c_client *client, u16 reg, u16 val)
{ … }
static int iqs5xx_write_byte(struct i2c_client *client, u16 reg, u8 val)
{ … }
static void iqs5xx_reset(struct i2c_client *client)
{ … }
static int iqs5xx_bl_cmd(struct i2c_client *client, u8 bl_cmd, u16 bl_addr)
{ … }
static int iqs5xx_bl_open(struct i2c_client *client)
{ … }
static int iqs5xx_bl_write(struct i2c_client *client,
u16 bl_addr, u8 *pmap_data, u16 pmap_len)
{ … }
static int iqs5xx_bl_verify(struct i2c_client *client,
u16 bl_addr, u8 *pmap_data, u16 pmap_len)
{ … }
static int iqs5xx_set_state(struct i2c_client *client, u8 state)
{ … }
static int iqs5xx_open(struct input_dev *input)
{ … }
static void iqs5xx_close(struct input_dev *input)
{ … }
static int iqs5xx_axis_init(struct i2c_client *client)
{ … }
static int iqs5xx_dev_init(struct i2c_client *client)
{ … }
static irqreturn_t iqs5xx_irq(int irq, void *data)
{ … }
static int iqs5xx_fw_file_parse(struct i2c_client *client,
const char *fw_file, u8 *pmap)
{ … }
static int iqs5xx_fw_file_write(struct i2c_client *client, const char *fw_file)
{ … }
static ssize_t fw_file_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{ … }
static ssize_t fw_info_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_WO(fw_file);
static DEVICE_ATTR_RO(fw_info);
static struct attribute *iqs5xx_attrs[] = …;
static umode_t iqs5xx_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int i)
{ … }
static const struct attribute_group iqs5xx_group = …;
__ATTRIBUTE_GROUPS(…);
static int iqs5xx_suspend(struct device *dev)
{ … }
static int iqs5xx_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(iqs5xx_pm, iqs5xx_suspend, iqs5xx_resume);
static int iqs5xx_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id iqs5xx_id[] = …;
MODULE_DEVICE_TABLE(i2c, iqs5xx_id);
static const struct of_device_id iqs5xx_of_match[] = …;
MODULE_DEVICE_TABLE(of, iqs5xx_of_match);
static struct i2c_driver iqs5xx_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;