125 Commits

Author SHA1 Message Date
Federico Lorenzi aeb7ca96ea Merge pull request #63 from roadrunner2/small-fixes
Small fixes
2018-03-14 11:19:57 +02:00
Federico Lorenzi 030150077d Merge pull request #62 from roadrunner2/handle-rollover-overflow
applespi: Handle key rollover overflow.
2018-03-14 11:19:17 +02:00
Ronald Tschalär 917d8bc68b applespi: Verify crc before verifying fields.
Minor, but we shouldn't really be looking at anything inside a message
before verifying the crc.
2018-03-04 01:57:17 -08:00
Ronald Tschalär 3e04fc1020 applespi: Fix spelling mistake in comment. 2018-03-04 01:57:16 -08:00
Ronald Tschalär 02ccb27643 applespi: Handle key rollover overflow.
The keyboard sends an all keys = 1 keyboard event when an overflow is
detected, which we need to detect and ignore.

This fixes #53.
2018-03-04 01:53:52 -08:00
Federico Lorenzi c98c6722c0 Merge pull request #56 from roadrunner2/fixes-and-message-structure-detailing
Fixes and message structure detailing
2018-01-04 19:56:36 +02:00
Ronald Tschalär 9568e5be4d applespi: Add support for messages split over multiple packets.
With this we now properly report all 11 fingers on MacBook Pro's (and
possibly some newer MacBook's).
2017-12-28 22:48:15 -08:00
Ronald Tschalär 2056b1b5de applespi: Rework command assembly to use new structures.
This makes the commands a little less magical.
2017-12-28 22:48:15 -08:00
Ronald Tschalär 0b58c81191 applespi: Verify lengths and crc's on received packets. 2017-12-28 22:48:15 -08:00
Ronald Tschalär 042729a9cf applespi: Refine the packet data structures.
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.
2017-12-28 22:48:15 -08:00
Ronald Tschalär 3711d17461 applespi: Add module parameter to set the touchpad dimensions.
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.
2017-12-28 22:48:05 -08:00
Ronald Tschalär 242a2fa92c applespi: Flush all outstanding operations on suspend.
And for good measure clear all flags and state on resume.
2017-12-28 22:47:14 -08:00
Ronald Tschalär ca42a2ad20 applespi: Fix cleanup after error sending commands.
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.
2017-12-28 22:47:07 -08:00
Federico Lorenzi c106357856 Merge pull request #54 from roadrunner2/cleanups2
Second round of cleanups.
2017-12-28 10:13:09 +02:00
Ronald Tschalär 31771d3e73 applespi: Trivial whitespace fixes. 2017-12-19 01:55:14 -08:00
Ronald Tschalär d28e037c4f applespi: Added a few extra inline comments. 2017-12-19 01:55:14 -08:00
Ronald Tschalär fb86c8ddef applespi: Comment formatting cleanup.
As pointed out by Lukas Wunner.
2017-12-19 01:55:14 -08:00
Ronald Tschalär 629d0989bc applespi: Added copyright header. 2017-12-19 01:55:14 -08:00
Ronald Tschalär 357182b599 applespi: Removed out-of-memory message flagged by checkpatch. 2017-12-19 01:55:14 -08:00
Ronald Tschalär 9c998ceee3 applespi: Coding standards cleanup.
These are all style issues found by checkpatch.pl with --strict. No
functional changes.
2017-12-19 01:55:14 -08:00
Ronald Tschalär 6461ab8248 applespi: Minor input-capability cleanups.
Replaced raw __set_bit()'s with input_set_capability() for consistency.
With this the explicit setting of evbit is not necessary.

Also, removed duplicate BTN_LEFT setting.
2017-12-19 01:55:14 -08:00
Ronald Tschalär ac45e7cbbe applespi: Expand and simplify instructions in README.
Put all the module notes together in their respective paragraphs.

Added note about ensuring the modules are put in the initrd and that
doing so appears to solve the irqpoll issue on these machines.

Simplified instructions for setting up the modules in the initrd.
2017-12-19 01:33:43 -08:00
Federico Lorenzi 467f7949e3 Merge pull request #51 from rquast/patch-1
Updated required module for MacBook8,1 (2015)
2017-10-29 17:39:22 +02:00
Federico Lorenzi 28ee7ae51e Merge pull request #48 from roadrunner2/formatting-cleanup
Formatting cleanup
2017-10-29 17:38:54 +02:00
Roland Quast 2cdf514236 Updated required module for MacBook8,1 (2015)
Using spi_pxa2xx_pci removes the need for irqpoll and fixes initramfs https://github.com/cb22/macbook12-spi-driver/issues/50
2017-10-27 16:03:32 +10:00