Skip to content
Permalink
Browse files

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
kalltkaffe/galaxy-2636@b5bd2c5

[1]http://source.android.com/tech/input/touch-devices.html#touch-device-driver-requirements
  • Loading branch information
alanorth committed Mar 30, 2012
1 parent f650e32 commit 9571ea442a39976a79c471d650b625c8b26a0460
Showing with 3 additions and 2 deletions.
  1. +3 −2 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);

8 comments on commit 9571ea4

@crotoloandroid

This comment has been minimized.

Copy link

crotoloandroid replied Mar 30, 2012

oh god, you make it look easy. Big congrats!

whats next??

@alanorth

This comment has been minimized.

Copy link
Owner Author

alanorth replied Mar 30, 2012

Sooooo many things next. ahahahhaa. I might post an alpha soon. But I don't know what good that would do. A bunch of users complaining about their apps not working. lame. hahahahh.

@crotoloandroid

This comment has been minimized.

Copy link

crotoloandroid replied Mar 31, 2012

no, I hear ya. well I would post it as for developers only, so maybe we will get some devs to have a peek. Post it with a large warning, in fact password protect the download with something like -- I claim responsibility -- j/k
Once I get my build all set up I may give it a flash. This is still my primary device so I would need a few things working.

I will donate when this gets working.
And hope to contribute in some way.

@ohanar

This comment has been minimized.

Copy link

ohanar replied Mar 31, 2012

I've added this changeset into the kernel sources I'm maintaining (https://github.com/ohanar/kernel_samsung_c210), it might be good to work off of a common base.

@alanorth

This comment has been minimized.

Copy link
Owner Author

alanorth replied Mar 31, 2012

@ohanar

This comment has been minimized.

Copy link

ohanar replied Mar 31, 2012

My sources are currently based off of the p6210 honeycomb update1, which is more recent than any other official exynos4 tablet source drop as far as I can tell.

Wifi looks like it will be a problem, I've tinkered a bit with getting it to work, but no luck so far. We also have an Atheros 600x chip.

@alanorth

This comment has been minimized.

Copy link
Owner Author

alanorth replied Mar 31, 2012

@alanorth

This comment has been minimized.

Copy link
Owner Author

alanorth replied Mar 31, 2012

(power's back)

Ah, yes. I see your recent update1 merge in the kernel. Lots of changes! I'm going to test this new source tonight. :)

Please sign in to comment.
You can’t perform that action at this time.