+ input_report_abs(input, ABS_X, ts->tc.y1); + input_report_abs(input, ABS_Y, ts->tc.x1); Are x1/y1 already swapped? It seemed like the above lines aren't consistent with your other patches?
-----Original Message----- From: James [mailto:[email protected]] Sent: Friday, August 20, 2010 7:24 AM To: [email protected] Cc: Zhang, Lei A; Van De Ven, Arjan; Yang, Jianwei Subject: [PATCH 1/4] cy8ctmg110: Removed X and Y scaling factor The cy8ctmg110 controller is providing values in the full range and doesn't need to be scaled; applying the scaling factors results in pointer skew (perceived as a calibration bug.) This patch removes the use of the {X,Y}_SCALE_FACTOR values. If scaling is needed for a given hardware configuration, that should likely be managed via input_set_abs_params() (or similar) This fixes bugs.meego.com bug #4985. Signed-off-by: James Ketrenos <[email protected]> --- drivers/input/touchscreen/cy8ctmg110_ts.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 152163c..c1677f9 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -58,10 +58,6 @@ #define CY8CTMG110_POLL_TIMER_DELAY (1000*1000*100) #define TOUCH_MAX_I2C_FAILS 50 -/* Scale factors for coordinates */ -#define X_SCALE_FACTOR 9387/8424 -#define Y_SCALE_FACTOR 97/100 - /* Polling mode */ static int polling; module_param(polling, int, 0); @@ -165,17 +161,10 @@ static void cy8ctmg110_send_event(void *tsc) { struct cy8ctmg110 *ts = tsc; struct input_dev *input = ts->input; - u16 x, y; - u16 x2, y2; - - x = ts->tc.x1; - y = ts->tc.y1; input_report_key(input, BTN_TOUCH, 1); - x2 = (u16) (y * X_SCALE_FACTOR); - y2 = (u16) (x * Y_SCALE_FACTOR); - input_report_abs(input, ABS_X, x2); - input_report_abs(input, ABS_Y, y2); + input_report_abs(input, ABS_X, ts->tc.y1); + input_report_abs(input, ABS_Y, ts->tc.x1); input_sync(input); } -- 1.7.1 _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
