From a84f7668d757c2c241ef094a0ff1cf691e410a4e Mon Sep 17 00:00:00 2001 From: Prabu Renganathan Date: Fri, 2 Mar 2012 15:40:41 +0800 Subject: [PATCH] max11871: fix calibration for x and y coordinates BZ: 25967 x/y co-ordinates are marginally off Change-Id: If4a9818088fd4186129e1060c0690408974299b3 Signed-off-by: Prabu Renganathan Reviewed-on: http://android.intel.com:8080/37307 Reviewed-by: Liu, Hong Reviewed-by: Du, Alek Tested-by: Wang, Zhifeng Reviewed-by: Monroy, German Reviewed-by: buildbot Tested-by: buildbot --- drivers/input/touchscreen/max11871.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/max11871.c b/drivers/input/touchscreen/max11871.c index be779f3..433a60c 100644 --- a/drivers/input/touchscreen/max11871.c +++ b/drivers/input/touchscreen/max11871.c @@ -69,8 +69,6 @@ do { ; } while (0); #define MAX11871_FINGER_NONE 0 #define MAX11871_FINGER_PRESS 1 #define MAX11871_FINGER_RELEASE 2 -#define MAX11871_X_OFFSET 30 -#define MAX11871_Y_OFFSET 30 struct max11871_finger_data { int status; @@ -391,13 +389,9 @@ max11871_process_touch_report(struct max11871_data *ts, u8 *reportBuffer) x = (x > 1280) ? 0 : 1280 - x; /* Y axis reversal */ - /* scale x and y */ - x = ((long)x * 0x3ff) / 0x3b5 - MAX11871_X_OFFSET; - y = ((long)y * 0x3ce) / 0x38c - MAX11871_Y_OFFSET; - ts->finger[finger_id].status = MAX11871_FINGER_PRESS; - ts->finger[finger_id].x = x < 0 ? 0 : x; - ts->finger[finger_id].y = y < 0 ? 0 : y; + ts->finger[finger_id].x = x; + ts->finger[finger_id].y = y; ts->finger[finger_id].z = z; } -- 2.7.4