diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2019-02-10 12:14:02 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-02-21 12:00:54 +0100 |
commit | 08367be171b0b7d6ff030a351a58d34f77803685 (patch) | |
tree | f0770c33ad503cc19136c10fb8ece10d6a75a7bc /drivers/hid/hid-uclogic-params.c | |
parent | 492a9e9a3c439a2ff486c60213fa5da3f465c2e9 (diff) | |
download | linux-08367be171b0b7d6ff030a351a58d34f77803685.tar.bz2 |
HID: uclogic: Add support for XP-Pen Deco 01
Add support for XP-Pen Deco 01 to hid-uclogic.
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/hid-uclogic-params.c')
-rw-r--r-- | drivers/hid/hid-uclogic-params.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c index 709eeb15e7de..9b0fc4dd31af 100644 --- a/drivers/hid/hid-uclogic-params.c +++ b/drivers/hid/hid-uclogic-params.c @@ -1019,6 +1019,29 @@ int uclogic_params_init(struct uclogic_params *params, } break; case VID_PID(USB_VENDOR_ID_UGEE, + USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO01): + /* If this is the pen and frame interface */ + if (bInterfaceNumber == 1) { + /* Probe v1 pen parameters */ + rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); + if (rc != 0) { + hid_err(hdev, "pen probing failed: %d\n", rc); + goto cleanup; + } + /* Initialize frame parameters */ + rc = uclogic_params_frame_init_with_desc( + &p.frame, + uclogic_rdesc_xppen_deco01_frame_arr, + uclogic_rdesc_xppen_deco01_frame_size, + 0); + if (rc != 0) + goto cleanup; + } else { + /* TODO: Consider marking the interface invalid */ + uclogic_params_init_with_pen_unused(&p); + } + break; + case VID_PID(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_TABLET_EX07S): /* Ignore non-pen interfaces */ if (bInterfaceNumber != 1) { |