Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
VoodooPS2 Changelog
============================
#### v2.3.8
- Fixed Elan touchpads with firmware `0x381f17` not reporting any input (acidanthera/bugtracker#1220)

#### v2.3.7
- Fixed multiple PS2/SMBus devices attaching
- Fixed eratic pointer in bootpicker by disabling SMBus/PS2 devices on shutdown
Expand Down
22 changes: 12 additions & 10 deletions VoodooPS2Trackpad/VoodooPS2Elan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,13 +1159,6 @@ int ApplePS2Elan::elantechSetupPS2() {
return -1;
}

/*
if (info.fw_version == 0x381f17) {
etd.original_set_rate = psmouse->set_rate;
psmouse->set_rate = elantech_set_rate_restore_reg_07;
}
*/

if (elantechSetInputParams()) {
DEBUG_LOG("VoodooPS2: failed to query touchpad range.\n");
return -1;
Expand All @@ -1185,11 +1178,20 @@ int ApplePS2Elan::elantechSetupPS2() {
request.commands[4].inOrOut = _mouseResolution; // 0x03 = 8 counts/mm
request.commands[5].command = kPS2C_SendCommandAndCompareAck;
request.commands[5].inOrOut = kDP_SetMouseScaling1To1; // 0xE6
request.commands[6].command = kPS2C_SendCommandAndCompareAck;
request.commands[6].inOrOut = kDP_Enable; // 0xF4, Enable Data Reporting
request.commandsCount = 7;
request.commandsCount = 6;
_device->submitRequestAndBlock(&request);

// Setting the sample rate above clears reg_07 on this firmware, which
// takes the touchpad out of absolute mode. It then streams relative
// packets that elantechPacketCheckV4 rejects, so no input is reported at
// all. Restore reg_07 while data reporting is still disabled. Linux does
// the same from a set_rate hook, see elantech_set_rate_restore_reg_07.
if (info.fw_version == 0x381f17 && elantechWriteReg(0x07, etd.reg_07)) {
DEBUG_LOG("VoodooPS2Elan: restoring reg_07 failed.\n");
}

setTouchPadEnable(true); // 0xF4, Enable Data Reporting

return 0;
}

Expand Down