Created
March 30, 2012 23:45
-
-
Save alanorth/2257946 to your computer and use it in GitHub Desktop.
Fix melfas touch screen on ICS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/input/touchscreen/melfas_ts.c b/drivers/input/touchscreen/melfas_ts.c | |
index 2bb5b95..3b6e9c1 100755 | |
--- a/drivers/input/touchscreen/melfas_ts.c | |
+++ b/drivers/input/touchscreen/melfas_ts.c | |
@@ -144,7 +144,8 @@ | |
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.Can you explain what is it? (code above) .I would like to emulate touchScreen for my samsung s3 via stm32 microcontroller