|
@@ -0,0 +1,40 @@
|
|
|
|
+diff --git a/drivers/input/touchscreen/egalax_i2c.c b/drivers/input/touchscreen/egalax_i2c.c
|
|
|
|
+index 9ee5566..827ad1b 100644
|
|
|
|
+--- a/drivers/input/touchscreen/egalax_i2c.c
|
|
|
|
++++ b/drivers/input/touchscreen/egalax_i2c.c
|
|
|
|
+@@ -68,6 +68,7 @@
|
|
|
|
+ #define REPORTID_MOUSE 0x01
|
|
|
|
+ #define REPORTID_VENDOR 0x03
|
|
|
|
+ #define REPORTID_MTOUCH 0x06//0x04
|
|
|
|
++#define REPORTID_MTOUCH18 0x18
|
|
|
|
+ #define MAX_RESOLUTION 4095
|
|
|
|
+
|
|
|
|
+ // running mode
|
|
|
|
+@@ -93,6 +94,7 @@ struct _egalax_i2c {
|
|
|
|
+ unsigned char skip_packet;
|
|
|
|
+ unsigned int ioctl_cmd;
|
|
|
|
+ int interrupt_gpio;
|
|
|
|
++ int max_resolution;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ struct egalax_char_dev
|
|
|
|
+@@ -415,6 +417,11 @@ static void ProcessReport(unsigned char *buf, struct _egalax_i2c *p_egalax_i2c)
|
|
|
|
+ contactID = buf[shift+1];
|
|
|
|
+ x = ((buf[shift+3]<<8) + buf[shift+2]);
|
|
|
|
+ y = ((buf[shift+5]<<8) + buf[shift+4]);
|
|
|
|
++
|
|
|
|
++ if (buf[0] == REPORTID_MTOUCH18) {
|
|
|
|
++ x >>= 2;
|
|
|
|
++ y >>= 2;
|
|
|
|
++ }
|
|
|
|
+
|
|
|
|
+ if( contactID>=MAX_SUPPORT_POINT )
|
|
|
|
+ {
|
|
|
|
+@@ -580,6 +587,7 @@ static int egalax_i2c_measure(struct _egalax_i2c *egalax_i2c)
|
|
|
|
+ switch(input_report_buf[2])
|
|
|
|
+ {
|
|
|
|
+ case REPORTID_MTOUCH:
|
|
|
|
++ case REPORTID_MTOUCH18:
|
|
|
|
+ if( !egalax_i2c->skip_packet && egalax_i2c->work_state==MODE_WORKING )
|
|
|
|
+ ProcessReport(input_report_buf+2, egalax_i2c);
|
|
|
|
+ ret = 0;
|