Skip to content

Commit

Permalink
melfas_ts: Fix for ICS touchscreen issues
Browse files Browse the repository at this point in the history
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 9571ea4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/input/touchscreen/melfas_ts.c
Expand Up @@ -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_X, x); \
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y); \ 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_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); \ input_mt_sync(ts->input_dev); \
} while (0) } while (0)


Expand Down Expand Up @@ -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_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_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_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_SYN, ts->input_dev->evbit);
// __set_bit(EV_KEY, ts->input_dev->evbit); // __set_bit(EV_KEY, ts->input_dev->evbit);
Expand Down

8 comments on commit 9571ea4

@crotoloandroid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

whats next??

@alanorth
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

@ohanar ohanar commented on 9571ea4 Mar 31, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner Author

@alanorth alanorth commented on 9571ea4 Mar 31, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohanar
Copy link

@ohanar ohanar commented on 9571ea4 Mar 31, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner Author

@alanorth alanorth commented on 9571ea4 Mar 31, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanorth
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(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.