forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HID: uclogic: Add support for XP-PEN Artist 22R Pro
Adds support for the XP-PEN Artist 22R Pro in uclogic, including the stylus, frame and pen pressure support. I did not do the research for this hardware, or the original patch - that work has been done by Aren Villanueva. For some reason they decided not to merge it. My changes include remapping the stupid amount of tablet frame buttons, cleaning up the code to match kernel style, and other small stuff. The tablet is (almost) fully functional even when uclogic doesn't handle it. Without initialization, the tablet has some sort of "basic driverless mode" that allows the tablet frame buttons to have some default keys associated with them (CTRL-S, CTRL-Z, that kind of stuff), but unfortunately the stylus pen semi-works. While pressure sensitivity works, only one stylus button functions correctly. Since the initialization process differs for Pro series tablets, the new function uclogic_params_init_ugee_xppen_pro had to be introduced. I also added USB HID IDs for this tablet too, but it's classified under the UGEE vendor ID. One of the more strange things I had to do is figure out a way to remap the buttons since there are 20 of them in total, and of course there are more buttons than there are BTN constants defined for us. When running without uclogic, it starts at BTN_0, ends at BTN_8 and the tablet starts reporting nonsensical keycodes so just leaving it alone isn't an option. I'm testing this under a libinput system, which has a list of buttons it considers "tablet pad buttons" which are notably BTN_0, BTN_1, so on and some gamepad/joystick buttons. So I created a new array called uclogic_extra_input_mapping for 20 working inputs. Another weird feature of this tablet is the second dial, which the original patchset introduced a new uclogic_frame param to handle since it seems it throws both dials values into one byte. The left wheel is considered EV_WHEEL and the other, EV_HWHEEL which seems fine to me. I also added the new param to the debug messages too. Link: DIGImend/digimend-kernel-drivers#557 Signed-off-by: Joshua Goins <[email protected]>
- Loading branch information
1 parent
8ac9a8f
commit 51d8c9b
Showing
6 changed files
with
351 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.