-
Posts
25 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Articles, News and Tips
Forums
Posts posted by Piranha
-
-
You just gave me an idea about a possible reason for why things are a bit different between my V3 and your V7
My V3 Pinnacle is set to a sample rate of 40 while V3 Rushmore and V7 are set to 100.
R6B9:
- Set Sample Rate to 40 packets/sec on V7 and V3 Rushmore (not sure if HW will actually accept that command).
- Hopefully fix mistake from last release.
- Fix accidental input while typing.
As always, test sleep and general performance.
This didn't work for me on my V7, same as last beta. The last working version for me was R6B7 .
-
R6B8 -> v7 trackpad doesn't work for me either..
-
R6B7:
- Updated Interrupt to Linux again, added a hack to prevent desync. (Let's hope this fixes sleep craziness)
- Changed Keyboard type from Apple to Unknown. (for Bronxteck)
- Cleaned up base driver, moved essential settings to ALPS driver instead.
- V8 should work again (since it needs the new Interrupt).
This release should be quite stable as we approach final Release 6.
Test:
- Sleep
- V3 Rushmore users: sleep, lid closing and opening
- General usability and stability
Driver report: V7 touchpad with ID: E7=0x73 0x03 0x0a,EC=0x88 0xb3 0x18 : EL Cap 10.11.6
The caps lock once pressed won't come out of caps unless I reboot, or change the keyboard caps lock modifier to something else. Everything else has got even better, like the pressure/sensitivity of the single tap needed to select an object, has greatly improved. Same with scrolling and not accidentally engaging other functions. Life is good! Thanks again..Also the three fingers for mission control doesn't work.
- 1
-
R6B6:
- Same fixes as Beta 5 (previous release) mostly to see if the updated interrupt was what broke sleep.
- Add a missed condition for V7 interrupt
- Disable V7 and V8 tracksticks for now. Those need debugging over live chat.
Test Caps Lock, Sleep, and general stability.
Driver report: V7 touchpad with ID: E7=0x73 0x03 0x0a,EC=0x88 0xb3 0x18 : EL Cap 10.11.6
CAPS LOCK DOESN'T WORK. IT'S STUCK ON PERMA CAPS. SLEEP WORKS, EVERYTHING ELSE HAS IMPROVED, PERFECT.The three fingers for mission control doesn't work. -
V7
Kind of the same result, intermittent. Works for a second then everything is kind of crazy. Cursor doesn't track with the actual location, touching pad acts like double click, starts to open anything on the desktop. Then cursor doesn't move at all, after a minute it would act normal for a second again. -
Does anyone know why sometimes virtual keyboard show standard keyboard with Fn key, instead of extended keyboard with number keypad?
No, but I can confirm that has happened to me as well. Sometimes the small keyboard shows and sometimes the full.
-
On macOS, left click is 1-finger tap and right click is 2-finger tap.
You might need to disable and re-enable them in system preferences.
If you want to enable drag lock: System P
On macOS, left click is 1-finger tap and right click is 2-finger tap.
You might need to disable and re-enable them in system preferences.
Highlighting text is done using the drag gesture: double-tap (don't lift after 2nd touch) & swipe across text.
If you want to enable drag lock: System Preferences > Accessibility > Mouse and Trackpad > Trackpad options > "with drag lock"
referencesHighlighting text is done using the drag gesture: double-tap (don't lift after 2nd touch) & swipe across text.
> Accessibility > Mouse and Trackpad > Trackpad options > "with drag lock"
Okay.. I think that pretty much solved everything for me ! : ) Except the caps lock.. which is not a big deal
-
Release 6 Beta 3:
- Filters for V7 and V8 tarckstick (like V3).
- Update trackstick detection on V3. Hope it doesn't break trackstick again.
- Disable link time optimization (LTO) (Jake Lo's reboots?)
​- Update bundle version to 6.0
- More cleaning, reordering, and fixing.
Just found out that V8 code was given to Linux by "ALPS Japan" themselves
That makes it the *only* version that it is not based on reverse-engineering!!!
Driver report: V7 touchpad with ID: E7=0x73 0x03 0x0a,EC=0x88 0xb3 0x18 : EL Cap 10.11.6Secondary click : Fixed .. It's perfect !!!!!! Thanks!Left/Right click button area on touchpad: Still corner edge, finger tip-pad. Works, still very small area. It takes a bit to find the area when working.Highlighting text:Okay, I think I can bring to light some of what's happening with text selection: If you're trying to select an area of text. You initiate by holding down your "left click button", then with your "right finger" start selecting an area of text. When reaching a point where you need to re-adjust on the touchpad to grab more area, you lift your "right finger" up to reposition it drops all the previous selected text, even though you still have your "left click" still engaged the whole time.Right click menu, I guess not a real issue... I started using the 2 finger tap to open menu..Caps Lock not workingThanks again for doing this!- 1
-
Release 6 beta 2:
- Added V7 valid packet check.
- Added V7 Trackstick support (initial).
- Update V5 to adhere with Linux.
- Reordered declarations in header.
- Reordered main functions in driver.
- Lots of miscellaneous cleanups, improvements.
Everyone should test this release regardless of the HW version. Almost everything has changed.
But PLEASE write your HW version when reporting.
Driver report: V7 touchpad with ID: E7=0x73 0x03 0x0a,
EC=0x88 0xb3 0x18 : EL Cap 10.11.6Huge improvement on secondary click : edit spoke too soon/still having some issues when using navigation. Seems like an improvement in sensitivity / accidental launch. Better than before. Maybe increasing the time between 1st and second taps ?
Slight improvement on Left/Right click edge: Area has increased from fingernail on corner edge, to finger tip-pad at corner edgeSelected Highlight still buggy, text spaces and end of paragraphs drop highlight. Drag and drop has dropping issues as well. However I’ve notice with drag and drop if I increase the speed in which I move selected items, the drag lock seems to hold. Just tested same with text selection as well, the increased rate of speed seems to overcome text spaces and hold the highlight.Still no Right click menuCaps lock not workingEverything else great!Thanks .. -
V8 test 6:
- V8 initialisation corrected. (Another major mistake. Sorry!!)
Only test this if you have V8 hardware. Nothing has changed for other models.
Follow up driver report:I’m very happy with what I have.The trackpad gestures the basic ones you referred in a previous post seem to all be working.The only things not working correctly is the right click, left click.My touchpad has no buttons, the click functions are pressing right and left corners of the pad, it actually depresses like a switch. They kind of work at the very, very edge of the corners using the very tips of my fingernail/fingers I can make it click to select and highlight text.So the left click function to select text works, but any breaks in the text, like the end of a paragraph or double spacing will not allow the highlight to go any further, and drops the highlight.The right click doesn’t bring up any menu functions like copy/paste etc. It just acts the same as the left click. I can select text or drag with it.Other than that the 2 fingers secondary click to open menus work great, but it's very sensitive. It opens accidentally quite a bit when using the 2 fingersnavigation /scrolling of web pages. Could be I just need to get acclimated.update: The caps lock key doesn't work.
Thanks again for your effort and hard work. It's hard to believe what a difference multitouch makes.
-
I checked all of those folders for AppleACPIPS2Nub and extra voodooPS2controller but found nothing. However KextWizard shows the following when i search for PS2 on the Loaded tab:
com.apple.AppleACPIPS2Nub 1
com.apple.ApplePS2Controller 1
com.apple.ApplePS2Keyboard 1
com.apple.ApplePS2Mouse 1
org.rehabman.voodoo.driver.PS2Controller 5.0.0 /System/Library/Extensions/VoodooPS2Controller.kext
There is no file reference for the other kexts and searching and looking in the folders you mentioned turned up nothing. Should I rebuild my System Kext Cache?
Go back into KextWizard filter "PS2" Highlight com.AppleACPIPS@Nub inside the loaded tab.
Then at the bottom where it says "found" "5" click the little down arrow. It will open up a menu. Click on reveal.. It should open the folder where its hiding. Try all of them to see if your missing something. To me it appears you still have ApplesPS2 kexts still installed. If not try rebuilding/ repair.
The dmesg log you posted, something is loading another copy of [email protected] Apple has one that needs to be deleted when installing a ps2 driver. Any other ps2 driver you install will have these inside them to emulate Apples. So it could be that another driver is causing a duplicate to load as well.
Also my understanding is to remove any existing "ApplePS2Controller, VoodooPS2Controller, AppleACPIPS2Nub, ApplePS2Keyboard and old Touchpad" kexts if you've installed one in the past, before installing the new one.
-
Look in your system/library/extension folder and see if you have the file AppleACPIPS2Nub.kext If so remove it and try again. Make sure you have only 1 copy voodooPs2controller.kext in there as well. In fact you shouldn't have anything in that folder that has to do with PS2 in it. Only the voodooPS2controller your trying.I'm currently using the V8 Test5 build and I am seeing this in my dmesg (I believe this error was present in previous builds as well):
OSMetaClass: Kext org.rehabman.voodoo.driver.PS2Controller class AppleACPIPS2Nub is a duplicate;kext com.apple.AppleACPIPS2Nub already has a class by that name.
Kext org.rehabman.voodoo.driver.PS2Controller start failed (result 0xdc00400a).
Kext org.rehabman.voodoo.driver.PS2Controller failed to load (0xdc008017).
Failed to load kext org.rehabman.voodoo.driver.PS2Controller (error 0xdc008017).
FakeSMC v6.14-290-gcdeb8b0.1654 Copyright 2014 netkas, slice, usr-sse2, kozlek, navi, THe KiNG, RehabMan. All rights reserved.
FakeSMC: 14 preconfigured keys added
FakeSMC: 5 keys exported by Clover EFI
SMC: successfully initialized
SuperIODevice: [Fatal] found unsupported chip! ITE sequence ID=0x1d00, Winbond sequence ID=0xffff
FakePCIID: Version 1.3.2 starting on OS X Darwin 15.3.
FakePCIID: [8086:9cb1] XHCIMux::startup: newData for PR2: 0x00000300
000001.069555 AppleUSBLegacyRoot@: AppleUSBLegacyRoot::init: enabling legacy matching
Kext org.rehabman.voodoo.driver.PS2Keyboard - library kext org.rehabman.voodoo.driver.PS2Controller not found.
Can't load kext org.rehabman.voodoo.driver.PS2Keyboard - failed to resolve library dependencies.
Kext org.rehabman.voodoo.driver.PS2Keyboard failed to load (0xdc00800e).
Failed to load kext org.rehabman.voodoo.driver.PS2Keyboard (error 0xdc00800e).
ACPIBatteryManager: WARNING! fCurrentCapacity > fMaxCapacity. adjusted fCurrentCapacity from 7080, to 6164
FakePCIID: [8086:9cb1] XHCIMux::configWrite32 address space(0x0000a000, 0xd0) data: 0x0000049b -> 0x00000300
mcache: 4 CPU(s), 64 bytes CPU cache line size
mbinit: done [128 MB total pool size, (85/42) split]
Kext org.rehabman.voodoo.driver.PS2Trackpad - library kext org.rehabman.voodoo.driver.PS2Controller not found.
Can't load kext org.rehabman.voodoo.driver.PS2Trackpad - failed to resolve library dependencies.
Kext org.rehabman.voodoo.driver.PS2Trackpad failed to load (0xdc00800e).
Failed to load kext org.rehabman.voodoo.driver.PS2Trackpad (error 0xdc00800e).
rooting via boot-uuid from /chosen: D711A4E0-9A8D-3B0D-B129-E10F020BC996
Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
AirPort_Brcm4360::init AirPortFamily_kexts-1110.26 "AirPortFamily_kexts-1110.26" Dec 10 2015 19:39:39
If that fails:
There are a couple of places depending on your installer another version of voodoops2controller could be hiding. Check the library/extension folder and the "extra" folder if there is one and EFI/clover/kext if there is one, depends if you used clover as your installer. Delete any other copies of VoodooPS2controller.kext if found in those locations.
-
Dr. Hurt you're a genius ! He got my touchpad working ! I'm the happiest man alive right now.
Thank you!
11/16/16 5:15:40.000 AM kernel[0]: ALPS: Found a V7 touchpad with ID: E7=0x73 0x03 0x0a, EC=0x88 0xb3 0x18
11/16/16 5:15:40.000 AM kernel[0]: ALPS: TouchPad driver started...
- 1
-
dinesh's driver is for pretty much all other trackpad other then alps so if it worked for you it most likely is not alps.
Yes, Dinesh's will work on almost any system in enhanced mouse mode only. It's a lot better than just the basic mouse functions you get with say VoodooPS2contoller.kext at least on my system. The touchpad prefpane will load as well. You just don't get any multitouch.
My IOreg is posted in an earlier post and it shows the ID as ALP000B. I've discussed this with others including Rehabman. He verified it as an ALPS. He did mention he might be getting an ALPS laptop, but he also said it may not be ps2 because newer systems are moving to I2C.
Side note: He also has updated his latest VoodooPS2contollers because some Synaptics didn't give ID's, something along those lines. Might be related ? He also added something new that corrected for the systems like I have. Something to do with the probook-87 id?
-
Boot with the kext, and check the E7 and EC ids. Those are whats used to match the device.
I can't figure out why my Alps touchpad isn't giving out a correct ID ?
AppleUSBMultitouchDriver::identify: not an ALPS device. Invalid E6 report
I'm a 100% sure this is what is it:
It should produce E7=73 03 0a, EC=88 b3 18
​Any Ideas?
Maybe because I have the latest bios firmware installed ?
Side note:
My Keyboard would also drop out when I used your version of VoodooPs2.kext I thought they were related ? Something is different with the VoodooPS2Keyboard.kext plugin?
Because the latest 2 versions by Rehabman VoodooPS2controller.kext they have something different in the keyboard plugin ? My keyboard works fine with the latest 2 versions. I guess what i'm asking is will you be updating to the latest version of voodoo keyboard plugins?
I had been using EMlyDinEsH version Appleps2smartouch.kext so i haven't noticed.
I will donate/pay to get this working on my system? I can send some Paypal Or if you need a 7950 hd gigabyte video card ? I really need to get this working on my system. Thanks!
-
My system is one of the ones listed below: So this must be the ID your looking for ?
Device ID = 0x73, 0x03, 0x0a
Firmware ID = 0x88, 0xb*, 0x**
I pulled this from a linux site hoping it would give you some definite info. It's a patch from 2014..http://comments.gmane.org/gmane.linux.kernel.input/35013 Here is a patch of supporting ALPS v7 protocol device. ALPS v7 protocol device is a clickpad that is currently used on Lenovo S430/S435/S530, Lenovo Z410/Z510, HP Odie, HP Revolve 810 G1, as well as other machines with ALPS Touchpad of following infomation: Device ID = 0x73, 0x03, 0x0a Firmware ID = 0x88, 0xb*, 0x** A v7 protocol support patch is first relesed 2 months ago: http://www.spinics.net/lists/linux-input/msg29084.html After that some feedbacks were received from end user. Now this patch fixed the bugs reported by them: 1) Fix cursor jump when doing a right click drag 2) Fix cursor jitter when button clicking Signed-off-by: Qiting Chen --- drivers/input/mouse/alps.c | 560 ++++++++++++++++++++++++++++++++++++++++++--- drivers/input/mouse/alps.h | 132 +++++++++-- 2 files changed, 641 insertions(+), 51 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index fb15c64..383281f 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -32,6 +32,13 @@ #define ALPS_REG_BASE_RUSHMORE 0xc2c0 #define ALPS_REG_BASE_PINNACLE 0x0000 +#define LEFT_BUTTON_BIT 0x01 +#define RIGHT_BUTTON_BIT 0x02 + +#define V7_LARGE_MOVEMENT 130 +#define V7_DEAD_ZONE_OFFSET_X 72 +#define V7_DEAD_ZONE_OFFSET_Y 72 + static const struct alps_nibble_commands alps_v3_nibble_commands[] = { { PSMOUSE_CMD_SETPOLL, 0x00 }, /* 0 */ { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */ @@ -99,6 +106,7 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = { #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with 6-byte ALPS packet */ +#define ALPS_BTNLESS 0x100 /* ALPS ClickPad flag */ static const struct alps_model_info alps_model_data[] = { { { 0x32, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */ @@ -140,6 +148,20 @@ static void alps_set_abs_params_mt(struct alps_data *priv, * isn't valid per PS/2 spec. */ +static unsigned int alps_pt_distance(struct alps_abs_data *pt0, + struct alps_abs_data *pt1) +{ + int vect_x, vect_y; + + if (!pt0 || !pt1) + return 0; + + vect_x = pt0->x - pt1->x; + vect_y = pt0->y - pt1->y; + + return int_sqrt(vect_x * vect_x + vect_y * vect_y); +} + /* Packet formats are described in Documentation/input/alps.txt */ static bool alps_is_valid_first_byte(struct alps_data *priv, @@ -320,8 +342,8 @@ static void alps_process_bitmap_dolphin(struct alps_data *priv, end_bit = y_msb - 1; box_middle_y = (priv->y_max * (start_bit + end_bit)) / (2 * (priv->y_bits - 1)); - *x1 = fields->x; - *y1 = fields->y; + *x1 = fields->pt.x; + *y1 = fields->pt.y; *x2 = 2 * box_middle_x - *x1; *y2 = 2 * box_middle_y - *y1; } @@ -461,6 +483,38 @@ static void alps_report_semi_mt_data(struct input_dev *dev, int num_fingers, alps_set_slot(dev, 1, num_fingers == 2, x2, y2); } +static void alps_report_coord_and_btn(struct psmouse *psmouse, + struct alps_fields *f) +{ + struct input_dev *dev; + + if (!psmouse || !f) + return; + + dev = psmouse->dev; + + if (f->fingers) { + input_report_key(dev, BTN_TOUCH, 1); + alps_report_semi_mt_data(dev, f->fingers, + f->pt_img[0].x, f->pt_img[0].y, + f->pt_img[1].x, f->pt_img[1].y); + input_mt_report_finger_count(dev, f->fingers); + + input_report_abs(dev, ABS_X, f->pt_img[0].x); + input_report_abs(dev, ABS_Y, f->pt_img[0].y); + input_report_abs(dev, ABS_PRESSURE, f->pt_img[0].z); + } else { + input_report_key(dev, BTN_TOUCH, 0); + input_mt_report_finger_count(dev, 0); + input_report_abs(dev, ABS_PRESSURE, 0); + } + + input_report_key(dev, BTN_LEFT, f->btn.left); + input_report_key(dev, BTN_RIGHT, f->btn.right); + + input_sync(dev); +} + static void alps_process_trackstick_packet_v3(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; @@ -523,13 +577,13 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse) static void alps_decode_buttons_v3(struct alps_fields *f, unsigned char *p) { - f->left = !!(p[3] & 0x01); - f->right = !!(p[3] & 0x02); - f->middle = !!(p[3] & 0x04); + f->btn.left = !!(p[3] & 0x01); + f->btn.right = !!(p[3] & 0x02); + f->btn.middle = !!(p[3] & 0x04); - f->ts_left = !!(p[3] & 0x10); - f->ts_right = !!(p[3] & 0x20); - f->ts_middle = !!(p[3] & 0x40); + f->btn.ts_left = !!(p[3] & 0x10); + f->btn.ts_right = !!(p[3] & 0x20); + f->btn.ts_middle = !!(p[3] & 0x40); } static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p, @@ -546,10 +600,10 @@ static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p, ((p[2] & 0x7f) << 1) | (p[4] & 0x01); - f->x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | + f->pt.x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | ((p[0] & 0x30) >> 4); - f->y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); - f->z = p[5] & 0x7f; + f->pt.y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); + f->pt.z = p[5] & 0x7f; alps_decode_buttons_v3(f, p); } @@ -573,9 +627,9 @@ static void alps_decode_dolphin(struct alps_fields *f, unsigned char *p, f->is_mp = !!(p[0] & 0x20); if (!f->is_mp) { - f->x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7)); - f->y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3)); - f->z = (p[0] & 4) ? 0 : p[5] & 0x7f; + f->pt.x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7)); + f->pt.y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3)); + f->pt.z = (p[0] & 4) ? 0 : p[5] & 0x7f; alps_decode_buttons_v3(f, p); } else { f->fingers = ((p[0] & 0x6) >> 1 | @@ -687,7 +741,7 @@ static void alps_process_touchpad_packet_v3_v5(struct psmouse *psmouse) * with x, y, and z all zero, so these seem to be flukes. * Ignore them. */ - if (f.x && f.y && !f.z) + if (f.pt.x && f.pt.y && !f.pt.z) return; /* @@ -695,12 +749,12 @@ static void alps_process_touchpad_packet_v3_v5(struct psmouse *psmouse) * to rely on ST data. */ if (!fingers) { - x1 = f.x; - y1 = f.y; - fingers = f.z > 0 ? 1 : 0; + x1 = f.pt.x; + y1 = f.pt.y; + fingers = f.pt.z > 0 ? 1 : 0; } - if (f.z >= 64) + if (f.pt.z >= 64) input_report_key(dev, BTN_TOUCH, 1); else input_report_key(dev, BTN_TOUCH, 0); @@ -709,22 +763,22 @@ static void alps_process_touchpad_packet_v3_v5(struct psmouse *psmouse) input_mt_report_finger_count(dev, fingers); - input_report_key(dev, BTN_LEFT, f.left); - input_report_key(dev, BTN_RIGHT, f.right); - input_report_key(dev, BTN_MIDDLE, f.middle); + input_report_key(dev, BTN_LEFT, f.btn.left); + input_report_key(dev, BTN_RIGHT, f.btn.right); + input_report_key(dev, BTN_MIDDLE, f.btn.middle); - if (f.z > 0) { - input_report_abs(dev, ABS_X, f.x); - input_report_abs(dev, ABS_Y, f.y); + if (f.pt.z > 0) { + input_report_abs(dev, ABS_X, f.pt.x); + input_report_abs(dev, ABS_Y, f.pt.y); } - input_report_abs(dev, ABS_PRESSURE, f.z); + input_report_abs(dev, ABS_PRESSURE, f.pt.z); input_sync(dev); if (!(priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS)) { - input_report_key(dev2, BTN_LEFT, f.ts_left); - input_report_key(dev2, BTN_RIGHT, f.ts_right); - input_report_key(dev2, BTN_MIDDLE, f.ts_middle); + input_report_key(dev2, BTN_LEFT, f.btn.ts_left); + input_report_key(dev2, BTN_RIGHT, f.btn.ts_right); + input_report_key(dev2, BTN_MIDDLE, f.btn.ts_middle); input_sync(dev2); } } @@ -916,6 +970,364 @@ static void alps_process_packet_v4(struct psmouse *psmouse) input_sync(dev); } +static bool alps_is_valid_package_v7(struct psmouse *psmouse) +{ + if ((psmouse->pktcnt == 3) && ((psmouse->packet[2] & 0x40) != 0x40)) + return false; + if ((psmouse->pktcnt == 4) && ((psmouse->packet[3] & 0x48) != 0x48)) + return false; + if ((psmouse->pktcnt == 6) && ((psmouse->packet[5] & 0x40) != 0x0)) + return false; + return true; +} + +static int alps_drop_unsupported_packet_v7(struct psmouse *psmouse) +{ + struct alps_data *priv = psmouse->private; + int drop = 1; + + if (priv->r.v7.pkt_id == V7_PACKET_ID_NEW || + priv->r.v7.pkt_id == V7_PACKET_ID_TWO || + priv->r.v7.pkt_id == V7_PACKET_ID_MULTI || + priv->r.v7.pkt_id == V7_PACKET_ID_IDLE) + drop = 0; + + return drop; +} + +static unsigned char alps_get_packet_id_v7(char *byte) +{ + unsigned char packet_id; + + if (byte[4] & 0x40) + packet_id = V7_PACKET_ID_TWO; + else if (byte[4] & 0x01) + packet_id = V7_PACKET_ID_MULTI; + else if ((byte[0] & 0x10) && !(byte[4] & 0x43)) + packet_id = V7_PACKET_ID_NEW; + else + packet_id = V7_PACKET_ID_IDLE; + + return packet_id; +} + +static void alps_get_finger_coordinate_v7(struct alps_abs_data *pt, + unsigned char *pkt, + unsigned char pkt_id) +{ + if ((pkt_id == V7_PACKET_ID_TWO) || + (pkt_id == V7_PACKET_ID_MULTI) || + (pkt_id == V7_PACKET_ID_NEW)) { + pt[0].x = ((pkt[2] & 0x80) << 4); + pt[0].x |= ((pkt[2] & 0x3F) << 5); + pt[0].x |= ((pkt[3] & 0x30) >> 1); + pt[0].x |= (pkt[3] & 0x07); + pt[0].y = (pkt[1] << 3) | (pkt[0] & 0x07); + + pt[1].x = ((pkt[3] & 0x80) << 4); + pt[1].x |= ((pkt[4] & 0x80) << 3); + pt[1].x |= ((pkt[4] & 0x3F) << 4); + pt[1].y = ((pkt[5] & 0x80) << 3); + pt[1].y |= ((pkt[5] & 0x3F) << 4); + + if (pkt_id == V7_PACKET_ID_TWO) { + pt[1].x &= ~0x000F; + pt[1].y |= 0x000F; + } else if (pkt_id == V7_PACKET_ID_MULTI) { + pt[1].x &= ~0x003F; + pt[1].y &= ~0x0020; + pt[1].y |= ((pkt[4] & 0x02) << 4); + pt[1].y |= 0x001F; + } else if (pkt_id == V7_PACKET_ID_NEW) { + pt[1].x &= ~0x003F; + pt[1].x |= (pkt[0] & 0x20); + pt[1].y |= 0x000F; + } + + pt[0].y = 0x7FF - pt[0].y; + pt[1].y = 0x7FF - pt[1].y; + + pt[0].z = (pt[0].x && pt[0].y) ? 62 : 0; + pt[1].z = (pt[1].x && pt[1].y) ? 62 : 0; + } +} + +static void alps_decode_packet_v7(struct alps_fields *f, + unsigned char *p, + struct psmouse *psmouse) +{ + struct alps_data *priv = psmouse->private; + static struct v7_raw prev_r; + + priv->r.v7.pkt_id = alps_get_packet_id_v7(p); + + alps_get_finger_coordinate_v7(f->pt_img, p, priv->r.v7.pkt_id); + + priv->r.v7.rest_left = 0; + priv->r.v7.rest_right = 0; + priv->r.v7.additional_fingers = 0; + priv->phy_btn = 0; + + if (priv->r.v7.pkt_id == V7_PACKET_ID_TWO || + priv->r.v7.pkt_id == V7_PACKET_ID_MULTI) { + priv->r.v7.rest_left = (p[0] & 0x10) >> 4; + priv->r.v7.rest_right = (p[0] & 0x20) >> 5; + } + + if (priv->r.v7.pkt_id == V7_PACKET_ID_MULTI) + priv->r.v7.additional_fingers = p[5] & 0x03; + + priv->phy_btn = (p[0] & 0x80) >> 7; + + if (priv->r.v7.pkt_id == V7_PACKET_ID_TWO) { + if (f->pt_img[0].z != 0 && f->pt_img[1].z != 0) + priv->r.v7.raw_fn = 2; + else + priv->r.v7.raw_fn = 1; + } else if (priv->r.v7.pkt_id == V7_PACKET_ID_MULTI) + priv->r.v7.raw_fn = 3 + priv->r.v7.additional_fingers; + else if (priv->r.v7.pkt_id == V7_PACKET_ID_IDLE) + priv->r.v7.raw_fn = 0; + else if (priv->r.v7.pkt_id == V7_PACKET_ID_NEW) + priv->r.v7.raw_fn = prev_r.raw_fn; + + /* It is a trick to bypass firmware bug of older version + that 'New' Packet is missed when finger number changed. + We fake a 'New' Packet in such cases.*/ + if (priv->r.v7.pkt_id == V7_PACKET_ID_TWO || + priv->r.v7.pkt_id == V7_PACKET_ID_MULTI || + priv->r.v7.pkt_id == V7_PACKET_ID_IDLE) { + if (priv->r.v7.raw_fn != prev_r.raw_fn) + priv->r.v7.pkt_id = V7_PACKET_ID_NEW; + } + + memcpy(&prev_r, &priv->r.v7, sizeof(struct v7_raw)); +} + +static void alps_set_each_pt_attr_v7(struct psmouse *psmouse, + struct alps_abs_data *pt, + struct alps_bl_pt_attr *pt_attr) +{ + struct alps_data *priv = psmouse->private; + unsigned int dist; + + if (!pt_attr->is_init_pt_got && pt->z != 0) { + pt_attr->is_init_pt_got = 1; + pt_attr->is_counted = 0; + memcpy(&pt_attr->init_pt, pt, sizeof(pt_attr->init_pt)); + } + + if (pt->z != 0) { + if (pt->y < priv->resting_zone_y_min) { + /* A finger is recognized as a non-resting finger + if it's position is outside the resting finger zone.*/ + pt_attr->zone = ZONE_NORMAL; + pt_attr->is_counted = 1; + } else { + /* A finger is recognized as a resting finger if it's + position is inside the resting finger zone and there's + no large movement from it's touch down position.*/ + pt_attr->zone = ZONE_RESTING; + + if (pt->x > priv->x_max / 2) + pt_attr->zone |= ZONE_RIGHT_BTN; + else + pt_attr->zone |= ZONE_LEFT_BTN; + + /* A resting finger will turn to be a non-resting + finger if it has made large movement from it's touch + down position. A non-resting finger will never turn + to a resting finger before it leaves the touchpad + surface.*/ + if (pt_attr->is_init_pt_got) { + dist = alps_pt_distance(pt, &pt_attr->init_pt); + + if (dist > V7_LARGE_MOVEMENT) + pt_attr->is_counted = 1; + } + } + } +} + +static void alps_set_pt_attr_v7(struct psmouse *psmouse, + struct alps_fields *f) +{ + struct alps_data *priv = psmouse->private; + int i; + + switch (priv->r.v7.pkt_id) { + case V7_PACKET_ID_TWO: + case V7_PACKET_ID_MULTI: + for (i = 0; i < V7_IMG_PT_NUM; i++) { + alps_set_each_pt_attr_v7(psmouse, + &f->pt_img[i], + &priv->pt_attr[i]); + } + break; + default: + /*All finger attributes are cleared when packet ID is + 'IDLE', 'New'or other unknown IDs. An 'IDLE' packet + indicates that there's no finger and no button activity. + A 'NEW' packet indicates the finger position in packet + is not continues from previous packet. Such as the + condition there's finger placed or lifted. In these cases, + finger attributes will be reset.*/ + memset(priv->pt_attr, 0, sizeof(priv->pt_attr[0]) * 2); + break; + } +} + +static void alps_cal_output_finger_num_v7(struct psmouse *psmouse, + struct alps_fields *f) +{ + struct alps_data *priv = psmouse->private; + unsigned int fn = 0; + int i; + + switch (priv->r.v7.pkt_id) { + case V7_PACKET_ID_IDLE: + case V7_PACKET_ID_NEW: + /*No finger is reported when packet ID is 'IDLE' or 'New'. + An 'IDLE' packet indicates that there's no finger on touchpad. + A 'NEW' packet indicates there's finger placed or lifted. + Finger position of 'New' packet is not continues from the + previous packet.*/ + fn = 0; + break; + case V7_PACKET_ID_TWO: + if (f->pt_img[0].z == 0) { + /*The first finger slot is zero when a non-resting + finger lifted and remaining only one resting finger + on touchpad. Hardware report the remaining resting + finger in second slot. This resting is ignored*/ + fn = 0; + } else if (f->pt_img[1].z == 0) { + /* The second finger slot is zero if there's + only one finger*/ + fn = 1; + } else { + /*All non-resting fingers will be counted to report*/ + fn = 0; + for (i = 0; i < V7_IMG_PT_NUM; i++) { + if (priv->pt_attr[i].is_counted) + fn++; + } + + /*In the case that both fingers are + resting fingers, report the first one*/ + if (!priv->pt_attr[0].is_counted && + !priv->pt_attr[1].is_counted) { + fn = 1; + } + } + break; + case V7_PACKET_ID_MULTI: + /*A packet ID 'MULTI' indicats that at least 3 non-resting + finger exist.*/ + fn = 3 + priv->r.v7.additional_fingers; + break; + } + + f->fingers = fn; +} + +static void alps_button_dead_zone_filter(struct psmouse *psmouse, + struct alps_fields *f, + struct alps_fields *prev_f) +{ + struct alps_data *priv = psmouse->private; + int dx, dy; + + if (priv->prev_phy_btn == 0 && priv->phy_btn != 0) { + memcpy(&priv->pt_attr[0].init_dead_pt, + &f->pt_img[0], + sizeof(struct alps_abs_data)); + } + + if (priv->pt_attr[0].init_dead_pt.x != 0 && + priv->pt_attr[0].init_dead_pt.x != 0) { + dx = f->pt_img[0].x - priv->pt_attr[0].init_dead_pt.x; + dy = f->pt_img[0].y - priv->pt_attr[0].init_dead_pt.y; + if ((abs(dx) > V7_DEAD_ZONE_OFFSET_X) || + (abs(dy) > V7_DEAD_ZONE_OFFSET_Y)) { + memset(&priv->pt_attr[0].init_dead_pt, 0, + sizeof(struct alps_abs_data)); + priv->btn_delay_cnt = 0; + } else { + memcpy(&f->pt_img[0], + &prev_f->pt_img[0], + sizeof(struct alps_abs_data)); + if (priv->prev_phy_btn == 0 && priv->phy_btn != 0) + priv->btn_delay_cnt = 2; + } + } + + if (priv->btn_delay_cnt > 0) { + f->btn.left = 0; + f->btn.right = 0; + priv->btn_delay_cnt--; + } +} + +static void alps_assign_buttons_v7(struct psmouse *psmouse, + struct alps_fields *f, + struct alps_fields *prev_f) +{ + struct alps_data *priv = psmouse->private; + + if (priv->phy_btn) { + if (!priv->prev_phy_btn) { + /* Report a right click as long as there's finger on + right button zone. Othrewise, report a left click.*/ + if (priv->r.v7.rest_right || + priv->pt_attr[0].zone & ZONE_RIGHT_BTN || + priv->pt_attr[1].zone & ZONE_RIGHT_BTN) { + f->btn.right = 1; + priv->pressed_btn_bits |= RIGHT_BUTTON_BIT; + } else { + f->btn.left = 1; + priv->pressed_btn_bits |= LEFT_BUTTON_BIT; + } + } else { + if (priv->pressed_btn_bits & RIGHT_BUTTON_BIT) + f->btn.right = 1; + if (priv->pressed_btn_bits & LEFT_BUTTON_BIT) + f->btn.left = 1; + } + } else { + priv->pressed_btn_bits = 0; + f->btn.right = 0; + f->btn.left = 0; + } + + alps_button_dead_zone_filter(psmouse, f, prev_f); + + priv->prev_phy_btn = priv->phy_btn; +} + +static void alps_process_packet_v7(struct psmouse *psmouse) +{ + struct alps_data *priv = psmouse->private; + struct alps_fields f = {0}; + static struct alps_fields prev_f; + unsigned char *packet = psmouse->packet; + + priv->decode_fields(&f, packet, psmouse); + + if (alps_drop_unsupported_packet_v7(psmouse)) + return; + + alps_set_pt_attr_v7(psmouse, &f); + + alps_cal_output_finger_num_v7(psmouse, &f); + + alps_assign_buttons_v7(psmouse, &f, &prev_f); + + alps_report_coord_and_btn(psmouse, &f); + + memcpy(&prev_f, &f, sizeof(struct alps_fields)); +} + static void alps_report_bare_ps2_packet(struct psmouse *psmouse, unsigned char packet[], bool report_buttons) @@ -1080,6 +1492,14 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) return PSMOUSE_BAD_DATA; } + if ((priv->proto_version == ALPS_PROTO_V7 && + !alps_is_valid_package_v7(psmouse))) { + psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", + psmouse->pktcnt - 1, + psmouse->packet[psmouse->pktcnt - 1]); + return PSMOUSE_BAD_DATA; + } + if (psmouse->pktcnt == psmouse->pktsize) { priv->process_packet(psmouse); return PSMOUSE_FULL_PACKET; @@ -1192,6 +1612,22 @@ static int alps_rpt_cmd(struct psmouse *psmouse, int init_command, return 0; } +static int alps_check_valid_firmware_id(unsigned char id[]) +{ + int valid = 1; + + if (id[0] == 0x73) + valid = 1; + else if (id[0] == 0x88) { + if ((id[1] == 0x07) || + (id[1] == 0x08) || + ((id[1] & 0xf0) == 0xB0)) + valid = 1; + } + + return valid; +} + static int alps_enter_command_mode(struct psmouse *psmouse) { unsigned char param[4]; @@ -1201,8 +1637,7 @@ static int alps_enter_command_mode(struct psmouse *psmouse) return -1; } - if ((param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) && - param[0] != 0x73) { + if (!alps_check_valid_firmware_id(param)) { psmouse_dbg(psmouse, "unknown response while entering command mode\n"); return -1; @@ -1704,6 +2139,36 @@ error: return ret; } +static int alps_hw_init_v7(struct psmouse *psmouse) +{ + struct ps2dev *ps2dev = &psmouse->ps2dev; + int reg_val, ret = -1; + + if (alps_enter_command_mode(psmouse)) + goto error; + + reg_val = alps_command_mode_read_reg(psmouse, 0xc2d9); + if (reg_val == -1) + goto error; + + if (alps_command_mode_write_reg(psmouse, 0xc2c9, 0x64)) + goto error; + + reg_val = alps_command_mode_read_reg(psmouse, 0xc2c4); + if (reg_val == -1) + goto error; + + if (__alps_command_mode_write_reg(psmouse, reg_val | 0x02)) + goto error; + + alps_exit_command_mode(psmouse); + return ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); + +error: + alps_exit_command_mode(psmouse); + return ret; +} + /* Must be in command mode when calling this function */ static int alps_absolute_mode_v4(struct psmouse *psmouse) { @@ -1875,6 +2340,7 @@ static void alps_set_defaults(struct alps_data *priv) priv->set_abs_params = alps_set_abs_params_st; priv->x_max = 1023; priv->y_max = 767; + priv->slot_number = 1; break; case ALPS_PROTO_V3: priv->hw_init = alps_hw_init_v3; @@ -1883,6 +2349,7 @@ static void alps_set_defaults(struct alps_data *priv) priv->decode_fields = alps_decode_pinnacle; priv->nibble_commands = alps_v3_nibble_commands; priv->addr_command = PSMOUSE_CMD_RESET_WRAP; + priv->slot_number = 2; break; case ALPS_PROTO_V4: priv->hw_init = alps_hw_init_v4; @@ -1890,6 +2357,7 @@ static void alps_set_defaults(struct alps_data *priv) priv->set_abs_params = alps_set_abs_params_mt; priv->nibble_commands = alps_v4_nibble_commands; priv->addr_command = PSMOUSE_CMD_DISABLE; + priv->slot_number = 2; break; case ALPS_PROTO_V5: priv->hw_init = alps_hw_init_dolphin_v1; @@ -1905,6 +2373,7 @@ static void alps_set_defaults(struct alps_data *priv) priv->y_max = 660; priv->x_bits = 23; priv->y_bits = 12; + priv->slot_number = 2; break; case ALPS_PROTO_V6: priv->hw_init = alps_hw_init_v6; @@ -1913,6 +2382,28 @@ static void alps_set_defaults(struct alps_data *priv) priv->nibble_commands = alps_v6_nibble_commands; priv->x_max = 2047; priv->y_max = 1535; + priv->slot_number = 2; + break; + case ALPS_PROTO_V7: + priv->hw_init = alps_hw_init_v7; + priv->process_packet = alps_process_packet_v7; + priv->decode_fields = alps_decode_packet_v7; + priv->set_abs_params = alps_set_abs_params_mt; + priv->nibble_commands = alps_v3_nibble_commands; + priv->addr_command = PSMOUSE_CMD_RESET_WRAP; + priv->x_max = 0xfff; + priv->y_max = 0x7ff; + priv->resting_zone_y_min = 0x654; + priv->byte0 = 0x48; + priv->mask0 = 0x48; + priv->flags = 0; + priv->slot_number = 2; + + priv->phy_btn = 0; + priv->prev_phy_btn = 0; + priv->btn_delay_cnt = 0; + priv->pressed_btn_bits = 0; + memset(priv->pt_attr, 0, sizeof(priv->pt_attr[0]) * 2); break; } } @@ -1982,6 +2473,11 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) return -EIO; else return 0; + } else if (ec[0] == 0x88 && (ec[1] & 0xf0) == 0xB0) { + priv->proto_version = ALPS_PROTO_V7; + alps_set_defaults(priv); + + return 0; } else if (ec[0] == 0x88 && ec[1] == 0x08) { priv->proto_version = ALPS_PROTO_V3; alps_set_defaults(priv); @@ -2045,7 +2541,7 @@ static void alps_set_abs_params_mt(struct alps_data *priv, struct input_dev *dev1) { set_bit(INPUT_PROP_SEMI_MT, dev1->propbit); - input_mt_init_slots(dev1, 2, 0); + input_mt_init_slots(dev1, priv->slot_number, 0); input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, priv->x_max, 0, 0); input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, priv->y_max, 0, 0); diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index 03f88b6..dedbd27 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h @@ -18,11 +18,36 @@ #define ALPS_PROTO_V4 4 #define ALPS_PROTO_V5 5 #define ALPS_PROTO_V6 6 +#define ALPS_PROTO_V7 7 + +#define MAX_IMG_PT_NUM 5 +#define V7_IMG_PT_NUM 2 + +#define ZONE_NORMAL 0x01 +#define ZONE_RESTING 0x02 +#define ZONE_LEFT_BTN 0x04 +#define ZONE_RIGHT_BTN 0x08 #define DOLPHIN_COUNT_PER_ELECTRODE 64 #define DOLPHIN_PROFILE_XOFFSET 8 /* x-electrode offset */ #define DOLPHIN_PROFILE_YOFFSET 1 /* y-electrode offset */ +/* + * enum V7_PACKET_ID - defines the packet type for V7 + * V7_PACKET_ID_IDLE: There's no finger and no button activity. + * V7_PACKET_ID_TWO: There's one or two non-resting fingers on touchpad + * or there's button activities. + * V7_PACKET_ID_MULTI: There are at least three non-resting fingers. + * V7_PACKET_ID_NEW: The finger position in slot is not continues from + * previous packet. +*/ +enum V7_PACKET_ID { + V7_PACKET_ID_IDLE, + V7_PACKET_ID_TWO, + V7_PACKET_ID_MULTI, + V7_PACKET_ID_NEW, +}; + /** * struct alps_model_info - touchpad ID table * @signature: E7 response string to match. @@ -66,15 +91,7 @@ struct alps_nibble_commands { }; /** - * struct alps_fields - decoded version of the report packet - * @x_map: Bitmap of active X positions for MT. - * @y_map: Bitmap of active Y positions for MT. - * @fingers: Number of fingers for MT. - * @x: X position for ST. - * @y: Y position for ST. - * @z: Z position for ST. - * @first_mp: Packet is the first of a multi-packet report. - * @is_mp: Packet is part of a multi-packet report. + * struct alps_btn - decoded version of the button status * @left: Left touchpad button is active. * @right: Right touchpad button is active. * @middle: Middle touchpad button is active. @@ -82,16 +99,7 @@ struct alps_nibble_commands { * @ts_right: Right trackstick button is active. * @ts_middle: Middle trackstick button is active. */ -struct alps_fields { - unsigned int x_map; - unsigned int y_map; - unsigned int fingers; - unsigned int x; - unsigned int y; - unsigned int z; - unsigned int first_mp:1; - unsigned int is_mp:1; - +struct alps_btn { unsigned int left:1; unsigned int right:1; unsigned int middle:1; @@ -102,6 +110,73 @@ struct alps_fields { }; /** + * struct alps_btn - decoded version of the X Y Z postion for ST. + * @x: X position for ST. + * @y: Y position for ST. + * @z: Z position for ST. + */ +struct alps_abs_data { + unsigned int x; + unsigned int y; + unsigned int z; +}; + +/** + * struct alps_fields - decoded version of the report packet + * @fingers: Number of fingers for MT. + * @pt: X Y Z postion for ST. + * @pt: X Y Z postion for image MT. + * @x_map: Bitmap of active X positions for MT. + * @y_map: Bitmap of active Y positions for MT. + * @first_mp: Packet is the first of a multi-packet report. + * @is_mp: Packet is part of a multi-packet report. + * @btn: Button activity status + */ +struct alps_fields { + unsigned int fingers; + struct alps_abs_data pt; + struct alps_abs_data pt_img[MAX_IMG_PT_NUM]; + unsigned int x_map; + unsigned int y_map; + unsigned int first_mp:1; + unsigned int is_mp:1; + struct alps_btn btn; +}; + +/** + * struct v7_raw - data decoded from raw packet for V7. + * @pkt_id: An id that specifies the type of packet. + * @additional_fingers: Number of additional finger that is neighter included + * in pt slot nor reflected in rest_left and rest_right flag of data packet. + * @rest_left: There are fingers on left resting zone. + * @rest_right: There are fingers on right resting zone. + * @raw_fn: The number of finger on touchpad. + */ +struct v7_raw { + unsigned char pkt_id; + unsigned int additional_fingers; + unsigned char rest_left; + unsigned char rest_right; + unsigned char raw_fn; +}; + +/** + * struct alps_bl_pt_attr - generic attributes of touch points for buttonless device + * @zone: The part of touchpad that the touch point locates + * @is_counted: The touch point is not a resting finger. + * @is_init_pt_got: The touch down point is got. + * @init_pt: The X Y Z position of the touch down point. + * @init_dead_pt: The touch down point of a finger used by dead zone process. + */ +struct alps_bl_pt_attr { + unsigned char zone; + unsigned char is_counted; + unsigned char is_init_pt_got; + struct alps_abs_data init_pt; + struct alps_abs_data init_dead_pt; +}; + +/** * struct alps_data - private data structure for the ALPS driver * @dev2: "Relative" device used to report trackstick or mouse activity. * @phys: Physical path for the relative device. @@ -116,8 +191,10 @@ struct alps_fields { * @flags: Additional device capabilities (passthrough port, trackstick, etc.). * @x_max: Largest possible X position value. * @y_max: Largest possible Y position value. + * @resting_zone_y_min: Smallest Y postion value of the bottom resting zone. * @x_bits: Number of X bits in the MT bitmap. * @y_bits: Number of Y bits in the MT bitmap. + * @img_fingers: Number of image fingers. * @hw_init: Protocol-specific hardware init function. * @process_packet: Protocol-specific function to process a report packet. * @decode_fields: Protocol-specific function to read packet bitfields. @@ -132,6 +209,11 @@ struct alps_fields { * @fingers: Number of fingers from last MT report. * @quirks: Bitmap of ALPS_QUIRK_*. * @timer: Timer for flushing out the final report packet in the stream. + * @v7: Data decoded from raw packet for V7 + * @phy_btn: Physical button is active. + * @prev_phy_btn: Physical button of previous packet is active. + * @pressed_btn_bits: Pressed positon of button zone + * @pt_attr: Generic attributes of touch points for buttonless device. */ struct alps_data { struct input_dev *dev2; @@ -145,8 +227,10 @@ struct alps_data { unsigned char flags; int x_max; int y_max; + int resting_zone_y_min; int x_bits; int y_bits; + unsigned char slot_number; int (*hw_init)(struct psmouse *psmouse); void (*process_packet)(struct psmouse *psmouse); @@ -161,6 +245,16 @@ struct alps_data { int fingers; u8 quirks; struct timer_list timer; + + /* these are used for buttonless touchpad*/ + union { + struct v7_raw v7; + } r; + unsigned char phy_btn; + unsigned char prev_phy_btn; + unsigned char btn_delay_cnt; + unsigned char pressed_btn_bits; + struct alps_bl_pt_attr pt_attr[MAX_IMG_PT_NUM]; }; #define ALPS_QUIRK_TRACKSTICK_BUTTONS 1 /* trakcstick buttons in trackstick packet */ -- 1.8.3.2 --
Above is what i've found out...
It's a version 7
Here's the windows driver
Windows ALPS driver
Alps GlidePoint Trackpad V8.201.1717.124
Software Description:
This package contains the Alps GlidePoint Trackpad Driver. This driver provides advanced functionality, including support for multi-touch gestures and TouchGuard palm rejection.
Hardware Devices
ACPI\ALP000A="Alps GlidePoint Trackpad"
ACPI\ALP000B="Alps GlidePoint Trackpad"
ACPI\VEN_ALP&DEV_000A="Alps GlidePoint Trackpad"
ACPI\VEN_ALP&DEV_000B="Alps GlidePoint Trackpad
More from IOREG
compatible : ALP000B ALP0100 ALP0002 PNP0F13 = from Ioreg
name: <"ALP000B">
PNP0303
Hp probook-87
HPQ8001
----------------------------------
Info running linux commands on Mint
AlpsPS/2 Alps dual point stick
Isa0060/serio3/input1
vendor =0002 product=0008 version=0700
alpsps/2 alps dual point touchpad
---------------------------------
model alpsps/2
vendor 0x0002
device 0x0008
compatible to : int 0x021 0x003
alps
--------------------------- -
Boot with the kext, and check the E7 and EC ids. Those are whats used to match the device.
-
That was faster than I though. You are awesome
1- I'll fix the speed issue
2- The OS X part of the driver can only handle 2 touch points, so no problem.
3- 4-finger gestures work the same way as 3-finger, but they are not assigned to actions by default. Look at first post.
4- Setting an area for a right click would just add unneeded complexity. Leave it out for now.
5- I don't know what thumb rejection is :/
ALPS V7 test:
- Merged V7 code by coolstarorg
- Multiply speed by 1.5
My next step would be merge/clean up the byte_processing/interrupt handling.. I already did some work on that but have yet to commit changes.
I have a version 7 Alps but can't get this to work ?
I deleted all traces of any other versions of Voodoo in my SLE and my EFI
Install with KextWizard into my SLE .. Reboot nothing ? Running El Cap 10.11.6
I also tried the updated test version as well.
Thanks
Here's the info on my V7
compatible : ALP000B ALP0100 ALP0002 PNP0F13 = ioreg
name: <"ALP000B">
PNP0303
Hp probook-87
HPQ8001
----------------------------------
AlpsPS/2 Alps dual point stick =linux 1
Isa0060/serio3/input1
vendor =0002 product=0008 version=0700
alpsps/2 alps dual point touchpad
---------------------------------
model alpsps/2 =linux 2
vendor 0x0002
device 0x0008
compatible to : int 0x021 0x003
alps
-
Does this mean my Trackpad is a version 7 Alps, If so is it supported?
If it isn't could you add my ID in version so I can test ?
Thanks
compatible : ALP000B ALP0100 ALP0002 PNP0F13 = ioreg
name: <"ALP000B">
PNP0303
Hp probook-87
HPQ8001
----------------------------------
AlpsPS/2 Alps dual point stick =linux ? My laptop doesn't have a track stick.
Isa0060/serio3/input1
vendor =0002 product=0008 version=0700
alpsps/2 alps dual point touchpad
---------------------------------
model alpsps/2 Linux
vendor 0x0002
device 0x0008
compatible to : int 0x021 0x003
alps
-------------------------- -
I've tried lots of Alps touchpad kext floating around and haven't found 1 that would enable my trackpad. Would your Alp's driver be able to work on my system somehow ? I tried it but got nothing ?
Any help would be much appreciated
Thanks
Hp elitebook 810 g2 El-cap 10.11.6HP810G2ElitebookRevolve.ioreg.ioreg.zip
Here's all I know about it
compatible : ALP000B ALP0100 ALP0002 PNP0F13 = ioreg
name: <"ALP000B">
PNP0303
Hp probook-87
HPQ8001
----------------------------------
AlpsPS/2 Alps dual point stick =linux 1 ? It doesn't have a track stick.
Isa0060/serio3/input1
vendor =0002 product=0008 version=0700
alpsps/2 alps dual point touchpad
---------------------------------
model alpsps/2 =linux 2
vendor 0x0002
device 0x0008
compatible to : int 0x021 0x003
alps
-------------------------- -
Hello, I have a HP DM4 2075BR with the touchpad ALPS, I have tested all kinds of kext and they all do not work multitouch, the strange thing is that any one that I place works, but without multitouch !! post I tested all 2: Smatchtouch, EllanTouchpad !! the touchpad always work, but never with multitouch!
Someone can help-me?
I have sierra!
I have the same issue HP Elitebook 810 g2 El Cap 10.11.6 Alps touchpad. I've tried every kext known to man for Alps and nothing except simple mouse function. This one has the best function and the trackpad pref pane is working, except no multitouch function. I suspect we are getting enhanced mouse function. I'm willing to do whatever it takes to get the ALPs driver supporter here. The latest version works great even the keyboard functions are right, no sound issues either. Is there a way I could add my id into a info.plit inside the kext to allow me to test ? Truth is I would be happy with just 2 finger scroll. There is actually quite of few Dell models also with Alps as well.
Any help in this matter would be much appreciated.
Thanks
Here's all I know about it
compatible : ALP000B ALP0100 ALP0002 PNP0F13 = ioreg
name: <"ALP000B">
PNP0303
Hp probook-87
HPQ8001
----------------------------------
AlpsPS/2 Alps dual point stick =linux 1
Isa0060/serio3/input1
vendor =0002 product=0008 version=0700
alpsps/2 alps dual point touchpad
---------------------------------
model alpsps/2 =linux 2
vendor 0x0002
device 0x0008
compatible to : int 0x021 0x003
alps
--------------------------- -
Hi, I have a HP Elitebook 810 G2 i7 4th gen. EL Cap 10.11.6 with an ALPs trackpad. I'm very keen on getting this to work for my system. I've poured over my ioreg and went into linux and probed it as well.
I've tried almost every Alps kext version in existence and none of them did anything other than activate simple mouse. I've made sure there is no conflicts regarding other ps2 controller kext, still no Trackpad found. I'm pretty sure it has to do with my Alps being a version not supported ? I've tried most of the ones posted here.
Could I add my id to a specific info.plist inside the kext, to test it ?
Any help would be much appreciated
Thanks
Here's all I know about it
compatible : ALP000B ALP0100 ALP0002 PNP0F13 = ioreg
name: <"ALP000B">
PNP0303
Hp probook-87
HPQ8001
----------------------------------
AlpsPS/2 Alps dual point stick =linux 1
Isa0060/serio3/input1
vendor =0002 product=0008 version=0700
alpsps/2 alps dual point touchpad
---------------------------------
model alpsps/2 =linux 2
vendor 0x0002
device 0x0008
compatible to : int 0x021 0x003
alps
-------------------------- -
regarding your sleep issues :
sudo pmset hibernatemode 0
sudo rm -f /var/vm/sleepimage
sudo pmset hibernatefile /dev/null
This one cleared up most of my sleep issues:
sudo pmset -a standby 0 && sudo pmset -a autopoweroff 0
this will show your current settings:
pmset -g
or
pmset -g assertions
Also I've heard of setting darkwake=1 helps for some issues as well with sleep.
This is a boot arg set in your config.plist / via clover or manually
-
I got it worked, but now facing problem on sleep sometimes not work and not fully turned off when shutting down. Sometimes when i turn it on, it post to the ePSA Pre Boot Assessment. So what is the problem?
Mine does this as well about every other time on startup, it will go into EPSA. It never finds an issue, I just restart and everything works like normal. Mine is a Dell 7347,i5,4400,dw1560,8gb, 256ssd evo/samsung, Clover, Uefi,10.11.6,patched dsdt,ssdt etc I know another person who has the same issue. Neither one of us has figured out how to stop it, other than that 100% working EL Cap. Anyone ?
Refined ALPS TouchPad driver
in Kernel Extensions
Posted
Dr. Hurt ,
Is there away for me to make adjustments via a plist to the sensitivity when using the 2 finger scrolling ? I keep accidentally opening other things in the path while scrolling.