[DEV] Working HTC touchscreen driver fix for ICS, no porting necessary
Alright. Well. This is interesting.
I've fixed the original HTC touchscreen driver for use in ICS. I'm assuming it will work on other HTC phones as well, since the fix is FAR less intrusive in terms of changing existing code, or trying to port other drivers.
I was working on trying to map out the Samsung and HTC drivers in terms of data they let the system see as they are running. Getting no where fast, I remembered a couple days ago when I was attempting to get the touch keys working with the Samsung driver. Originally, I had added this code to the mxt224 driver above the line 'set_bit(EV_ABS, ts->input_dev->evbit);':
added to mxt224.c
I assumed this may have something to do with the softkeys, since it was present in the HTC driver with all four lines. By this I mean that in the HTC driver, that section looked like this:
It worked fine in CM7 after doing this, but I lost all touchscreen in ICS, with it not even registering touch data anymore.
Back to my main point, I decided to see what would happen if I totally removed those four lines from the atmel.c file (HTC driver) and see what happens in ICS. Long story short, it works. Apparently ICS doesn't use or absolutely hates one or all four of those input preprocessors. So yeah I kinda **** bricks that it was that simple.
I'm going to try to see if its one or just all of these keybits that's causing the problem and I'll report back.
If you want to try this, follow along:
- Get rid of build settings for the Samsung driver if you've been messing with that
- open up our favorite driver driver/input/touchscreen/atmel.c
- CRTL+F, search for EV_SYN
- Comment or delete all of the set_bit() lines except for the last one, EV_ABS
Your atmel.c should only have this line now, where all five were before:
- Clean your make environment and make sure your config files are set to use atmel-touchscreen
- **** bricks