add max x and y config for EETI driver
authorsakura <sakura@sakura-desktop.(none)>
Thu, 13 Jan 2011 08:20:54 +0000 (16:20 +0800)
committersakura <sakura@sakura-desktop.(none)>
Thu, 13 Jan 2011 08:20:54 +0000 (16:20 +0800)
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/eeti_egalax_i2c.c

index 4c211075e2bf4bed0e66c9ebbccab877db4aca4c..db1b56378487c8e19aa4a17db8367d6e602211e4 100755 (executable)
@@ -611,7 +611,27 @@ config EETI_EGALAX
 
           To compile this driver as a module, choose M here: the
           module will be called eeti_egalax_ts.
+       
+        config EETI_EGALAX_MAX_X
+                int "EETI_EGALAX_MAX_X"
+                depends on EETI_EGALAX
+                default 2047
+                help
+                  RK29 EETI_EGALAX touch max X size
 
+        config EETI_EGALAX_MAX_Y
+                int "EETI_EGALAX_MAX_Y"
+                depends on EETI_EGALAX
+                default 2047
+                help
+                  RK29 EETI_EGALAX touch max Y size
+
+        config EETI_EGALAX_DEBUG
+                bool "EETI_EGALAX debug"
+                depends on EETI_EGALAX
+                default n
+                help
+                  RK29 EETI_EGALAX touch debug
 
 config TOUCHSCREEN_IT7260
        tristate "IT7260 based touchscreens: IT7260 Interface"
index a59fcaa4cff605af3f4717cc6d67abff788d2604..1f8e800ff2804aa6b27b6f551002d004a73b22bc 100644 (file)
@@ -42,7 +42,7 @@
 #include <mach/board.h>
 
 //#define DEBUG
-#ifdef DEBUG
+#ifdef CONFIG_EETI_EGALAX_DEBUG
        #define TS_DEBUG(fmt,args...)  printk( KERN_DEBUG "[egalax_i2c]: " fmt, ## args)
        #define DBG() printk("[%s]:%d => \n",__FUNCTION__,__LINE__)
 #else
@@ -399,8 +399,8 @@ static struct input_dev * allocate_Input_Dev(void)
        
        set_bit(EV_ABS, pInputDev->evbit);
 
-       input_set_abs_params(pInputDev, ABS_MT_POSITION_X, 0, 1080, 0, 0);
-       input_set_abs_params(pInputDev, ABS_MT_POSITION_Y, 0, 800, 0, 0);
+       input_set_abs_params(pInputDev, ABS_MT_POSITION_X, 0, CONFIG_EETI_EGALAX_MAX_X, 0, 0);
+       input_set_abs_params(pInputDev, ABS_MT_POSITION_Y, 0, CONFIG_EETI_EGALAX_MAX_Y, 0, 0);
        input_set_abs_params(pInputDev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
        input_set_abs_params(pInputDev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
        input_set_abs_params(pInputDev, ABS_MT_TRACKING_ID, 0, 10, 0, 0);