[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);':
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.
Instructions
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:
Code:
set_bit(EV_ABS, ts->input_dev->evbit);
Clean your make environment and make sure your config files are set to use atmel-touchscreen
Yeah try that. I've run into something though, which must be something stupid I'm doing but I can't figure out what the hell it is.
I've gone through each of those that I commented out to see if it was just one of the set_bits that was making it not work. But even with them all on now it's still working in ICS. I've cleaned my builds between each time. I think I'm going crazy! Because it didn't work before!
Yeah try that. I've run into something though, which must be something stupid I'm doing but I can't figure out what the hell it is.
I've gone through each of those that I commented out to see if it was just one of the set_bits that was making it not work. But even with them all on now it's still working in ICS. I've cleaned my builds between each time. I think I'm going crazy! Because it didn't work before!
I'm building now and I will see what I can find out. It might be as simple as it forced the build to refresh in some way? Ill see what happens and let you know.
swm5126, I cannot than you enough for all the help. I really wouldn't have gotten anywhere without it. Least we can toast to a success!
But I am still looking into what needs to be commented, just a little excited to actually touch ICS. lol.
for me it does!!
but I still can't unlock the F screen...
Awesome! Glad I'm not crazy and this works. They must have deprecated some of the input preprocessors. I'm just surprised using them in the driver basically made the touchscreen inoperable in ICS.
One step closer...to something! Now to figure out those pesky idc files to get this to work without the pointers.
XDA Developer TV Producer Jayce released a video a … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?