-
Notifications
You must be signed in to change notification settings - Fork 107
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
Updates for 4.14 #46
Updates for 4.14 #46
Conversation
As of commit ecae013 ktime is always needed.
The whole workaround from commit 0c34936 is not necessary anymore in versions >= 4.14 since core spi now detects and handles Apple's DSM properties. As part of that we don't need to parse those properties ourselves anymore since they are now available as properties on the acpi devices.
This includes an update for 4.14 kernels.
@roadrunner2 great, this looks good to me. Unfortunately I cannot test at the moment, since I'm away and I've messed up my Linux installation (again). I'm happy to merge it in if you are. I guess at this point, we could probably start looking at doing some cleanup of the driver and getting it ready to send it upstream, now that it can attach without any hacks? (or not?) |
@cb22 On the one hand these changes are quite safe - other than a little code shuffling and conditional compilation, nothing changes. So yes, I'm quite comfortable with them. On the other hand there's no big hurry to get these in: things will work find on 4.14 even without these changes (it'll just keep using my hack instead of the new core features). So I'm fine either way, merging now or later. Regarding cleanup, agreed: I've had that pretty much next on my list. Besides cleanup there is one piece of functionality mising: the code currently assumes the touchpad data always arrives in single 256-byte packet, but when more than 6 fingers are pressed (and the palm sometimes triggers that too) it can be split among 2 256-byte packets. As I head mentioned elsewhere I managed to figure out a few more of the header fields, which provide the info to recognize continuation packets, so I need to make some changes to handle that. After that there's some small stuff like #44 , though I think we could consider upstreaming even without that. |
I can confirm the driver continues to work fine with this PR under Linux 4.14rc1. 👍 |
Regarding upstreaming, a few things that caught my eye while briefly looking over the code:
|
@1lk Thanks for the feedback. My responses are:
|
calling applespi_setup_spi_message() once: I don't think that's safe, as the message is modified by the spi driver (at the very least the status and some length fields); while it may be possible to trace the code and determine exactly what is modified, I think that would be brittle and unsafe. A lot of IIO drivers do that, see e.g. mcp320x.c: |
I see - thanks for the pointer. I've made this change now (see #48). |
This contains the work to exclude the DSDT hacks on kernels 4.14+, as promised in #29 (comment) - tested on 4.14-rc1. Also included are some README updates and a small #ifdef fix.