-
Notifications
You must be signed in to change notification settings - Fork 12
Surface Laptop 3: Touchpad & Keyboard support #24
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
Conversation
|
Also fixes caps lock light on SL3, refs #8. Potentially also working for SL1/2 if the same iid/cid is used but we need someone to verify. |
6d52cce to
371d14b
Compare
5298ab1 to
793faba
Compare
|
Really nice work, Thanks @archseer! |
f9cef17 to
b096b85
Compare
|
@qzed So I was about to say that this PR is ready, but there seems to be a kernel panic going on. I can trigger it by swiping the touchpad extremely fast, but I've also had it happen when running (edit: resolved) |
module/surface_sam_sid_vhf.c
Outdated
|
|
||
| platform_set_drvdata(pdev, drvdata); | ||
|
|
||
| status = hid_add_device(hid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qzed Likely we want to do the hid_add_device even later, right before returning?
hid-multitouch will start doing things as soon as the HID device is detected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should (mostly) work as is. The core driver is able to send output reports and set/get feature reports without the events on the EC being disabled. It breaks when the driver expects some input report being sent from the EC as response (as that's not enabled at this point). I don't have any idea if that's possible or done in practice, so we might want to change that.
If we want to change that: I think we should first set up the EC events and enable them, and then register the HID device to ensure other drivers can actually use it before we add it. Similarly on removing, first de-register/destroy the HID device and then remove and disable the events. That will require us to check if the HID device is set up in the event handler function, Which should be possible via an atomic bool or something.
e6ff25a to
3d92c5b
Compare
3d92c5b to
de05375
Compare
qzed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, mostly minor things. I'm not sure about the placement of the hid_add_device call and will check that. Good work so far!
ec39f0d to
eecddb2
Compare
eecddb2 to
80fd709
Compare
|
Thanks! Also you're alright with me adding (for integration into the kernel)? Edit: Approved via IRC. |
Depends on linux-surface/linux-surface#17
Fixes #22
Refs jakeday/linux-surface#591