-
Notifications
You must be signed in to change notification settings - Fork 119
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
Fixes and message structure detailing #56
Fixes and message structure detailing #56
Conversation
The write_active flag was not being cleared, making the module unremovable unless a subsequent write command succeeded. And similarly if this happened during a drain the notification was never sent. So perform a full cleanup after an error.
And for good measure clear all flags and state on resume.
This is mainly for new hardware, where we don't have the dimensions of the touchpad yet - with this users can explicitly set the dimensions until such time as they have been added to the internal list.
More fields in the spi packet(s) have been identified, and the structures reworked accordingly. In particular several fields in the overall header of the spi packet, as well the message header have been clarified. However, a number of fields are still unknown or have "magic" values; and perforce there's some random guesswork such as whether something is two 1-byte fields or a single 2-byte field. This lays the groundwork for improving the packet handling in the next commits.
This makes the commands a little less magical.
With this we now properly report all 11 fingers on MacBook Pro's (and possibly some newer MacBook's).
Great work @roadrunner2! It's really neat how those structures make everything so much less opaque. No more |
Seeing this only now, it's seriously beautiful work. You guys probably shouldn't hold off on upstreaming because of some remaining nits, I think the quality is already much better than a lot of other stuff in the kernel. |
Sorry for putting several things in one pull request, but there were conflicts when I tried to separate them out.
The big one here is 042729a, the long promised clarification of various fields in, and overall structure of the messages. There are still many unknowns, but I think at least the high level message/packet structures are clear now. The commits following that then capitalize on these structures, and in particular the last commit finally fixes the errors when more than 6 fingers are pressed (tested up to all 11 fingers...).