From 9571ea442a39976a79c471d650b625c8b26a0460 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 31 Mar 2012 01:16:27 +0300 Subject: [PATCH] melfas_ts: Fix for ICS touchscreen issues Add pressure and button touch so the touchscreen works according to Ice Cream Sandwich's new touch screen device driver requirements[1]. Ported from various other melfas and non-melfas ICS fixes: https://github.com/ohanar/kernel_samsung_c210/commit/dd5d2874ba19ec012f29aff31d330fd93af14b72 https://github.com/kalltkaffe/galaxy-2636/commit/b5bd2c594dedbbb351d33e4d937f749c7885aec5 [1]http://source.android.com/tech/input/touch-devices.html#touch-device-driver-requirements --- drivers/input/touchscreen/melfas_ts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/melfas_ts.c b/drivers/input/touchscreen/melfas_ts.c index 2bb5b954..3b6e9c16 100755 --- a/drivers/input/touchscreen/melfas_ts.c +++ b/drivers/input/touchscreen/melfas_ts.c @@ -144,7 +144,8 @@ do { \ input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x); \ input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y); \ input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, amplitude); \ - input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, width); \ + input_report_abs(ts->input_dev, ABS_MT_PRESSURE, amplitude); \ + input_report_key(ts->input_dev, BTN_TOUCH, 1); \ input_mt_sync(ts->input_dev); \ } while (0) @@ -2100,7 +2101,7 @@ static int melfas_ts_probe(struct i2c_client *client, const struct i2c_device_id input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y, 0, TS_MAX_Y_COORD, 0, 0); input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, TS_MAX_Z_TOUCH, 0, 0); input_set_abs_params(ts->input_dev, ABS_MT_TRACKING_ID, 0, MELFAS_MAX_TOUCH - 1, 0, 0); - input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, TS_MAX_W_TOUCH, 0, 0); + input_set_abs_params(ts->input_dev, ABS_MT_PRESSURE, 0, 255, 0, 0); // __set_bit(EV_SYN, ts->input_dev->evbit); // __set_bit(EV_KEY, ts->input_dev->evbit);