From 59b7a973d00b64dd1bea361af259f18fd1ae586d Mon Sep 17 00:00:00 2001 From: sakura Date: Thu, 13 Jan 2011 16:20:54 +0800 Subject: [PATCH] add max x and y config for EETI driver --- drivers/input/touchscreen/Kconfig | 20 ++++++++++++++++++++ drivers/input/touchscreen/eeti_egalax_i2c.c | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 4c211075e2bf..db1b56378487 100755 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -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" diff --git a/drivers/input/touchscreen/eeti_egalax_i2c.c b/drivers/input/touchscreen/eeti_egalax_i2c.c index a59fcaa4cff6..1f8e800ff280 100644 --- a/drivers/input/touchscreen/eeti_egalax_i2c.c +++ b/drivers/input/touchscreen/eeti_egalax_i2c.c @@ -42,7 +42,7 @@ #include //#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); -- 2.34.1