From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- include/linux/i2c/msg2138.h | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 include/linux/i2c/msg2138.h (limited to 'include/linux/i2c/msg2138.h') diff --git a/include/linux/i2c/msg2138.h b/include/linux/i2c/msg2138.h new file mode 100644 index 00000000..920e3d9b --- /dev/null +++ b/include/linux/i2c/msg2138.h @@ -0,0 +1,60 @@ +#ifndef __LINUX_MSG2138_H__ +#define __LINUX_MSG2138_H__ + +#include + +#define TS_DEBUG_MSG 0 +#define VIRTUAL_KEYS 1 +#define MSG2138_UPDATE 1 + +//#define TS_WIDTH_MAX 480 +//#define TS_HEIGHT_MAX 800 + +#define MSG2138_BUS_NUM 2 +#define MSG2138_TS_NAME "msg2138_ts" +#define MSG2138_TS_ADDR 0x26 +#define MSG2138_FW_ADDR 0x62 +#define MSG2138_FW_UPDATE_ADDR 0x49 + + +#define TPD_OK 0 +#define TPD_REG_BASE 0x00 +#define TPD_SOFT_RESET_MODE 0x01 +#define TPD_OP_MODE 0x00 +#define TPD_LOW_PWR_MODE 0x04 +#define TPD_SYSINFO_MODE 0x10 + +#define GET_HSTMODE(reg) ((reg & 0x70) >> 4) // in op mode or not +#define GET_BOOTLOADERMODE(reg) ((reg & 0x10) >> 4) // in bl mode + +struct msg2138_ts_platform_data{ + int irq_gpio_number; + int reset_gpio_number; + const char *vdd_name; + int virtualkeys[12]; + int TP_MAX_X; + int TP_MAX_Y; +}; +struct ts_event { + u16 x1; + u16 y1; + u16 x2; + u16 y2; + u8 touch_point; +}; + +struct msg2138_ts_data { + struct input_dev *input_dev; + struct ts_event event; + struct work_struct pen_event_work; + struct workqueue_struct *ts_workqueue; + struct early_suspend early_suspend; +}; + +struct TouchScreenInfo_t{ + unsigned char nTouchKeyMode; + unsigned char nTouchKeyCode; + //unsigned char nFingerNum; +} ; + +#endif -- cgit v1.3.1