8000 Test fix for RMI_READ_DATA_REPORT_ID by zhen-zen · Pull Request #65 · VoodooSMBus/VoodooRMI · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Test fix for RMI_READ_DATA_REPORT_ID #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
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
4 changes: 4 additions & 0 deletions VoodooRMI/RMIBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ void RMIBus::handleHostNotify()

if (error < 0){
IOLogError("Unable to read IRQ");
if (error == RMIBusRequestReset) {
awake = false;
setPowerState(kIOPMPowerOn, this);
}
return;
}

Expand Down
7 changes: 7 additions & 0 deletions VoodooRMI/Transports/I2C/RMII2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ int RMII2C::readBlock(u16 rmiaddr, u8 *databuff, size_t len) {
if (i2cInput[2] != RMI_READ_DATA_REPORT_ID) {
IOLogError("%s::%s RMI_READ_DATA_REPORT_ID mismatch %d", getName(), name, i2cInput[2]);
retval = -1;
char *buf = new char[len*2 + 9];
for (int i=0; i<len+4; i++)
snprintf(buf + 2*i, 3, "%2x", i2cInput[i]);
IOLogDebug("%s", buf);
delete [] buf;
if (i2cInput[2] == RMI_MOUSE_REPORT_ID)
retval = RMIBusRequestReset;
goto exit;
}

Expand Down
1 change: 1 addition & 0 deletions VoodooRMI/Transports/RMITransport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define kIOMessageVoodooI2CLegacyHostNotify iokit_vendor_specific_msg(422)
#define RMIBusIdentifier "Synaptics RMI4 Device"
#define RMIBusSupported "RMI4 Supported"
#define RMIBusRequestReset -2

// power management
static IOPMPowerState RMIPowerStates[] = {
Expand Down
0