summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-uclogic-params.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2019-02-10 13:13:59 +0300
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2019-02-21 14:00:54 +0300
commit1ee7c6852351fb0a025fe87e6a2570df4e4e24de (patch)
treea4fd5ffe682e6eae3327c9bc29dc6c68c8339d24 /drivers/hid/hid-uclogic-params.c
parent9c17f7353928ddb0ab5ee4cb8b29d7ddf8f8eab7 (diff)
downloadlinux-1ee7c6852351fb0a025fe87e6a2570df4e4e24de.tar.xz
HID: uclogic: Add support for Ugee EX07S frame controls
Add proper support for Ugee EX07(S) frame controls 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.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index 72a073ae454c..b22815cec06d 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -997,8 +997,6 @@ int uclogic_params_init(struct uclogic_params *params,
break;
case VID_PID(USB_VENDOR_ID_UGTIZER,
USB_DEVICE_ID_UGTIZER_TABLET_GP0610):
- case VID_PID(USB_VENDOR_ID_UGEE,
- USB_DEVICE_ID_UGEE_TABLET_EX07S):
/* If this is the pen interface */
if (bInterfaceNumber == 1) {
/* Probe v1 pen parameters */
@@ -1016,6 +1014,36 @@ int uclogic_params_init(struct uclogic_params *params,
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) {
+ uclogic_params_init_invalid(&p);
+ break;
+ }
+
+ rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev);
+ if (rc != 0) {
+ hid_err(hdev, "pen probing failed: %d\n", rc);
+ goto cleanup;
+ } else if (found) {
+ rc = uclogic_params_frame_init_with_desc(
+ &p.frame,
+ uclogic_rdesc_ugee_ex07_buttonpad_arr,
+ uclogic_rdesc_ugee_ex07_buttonpad_size,
+ 0);
+ if (rc != 0) {
+ hid_err(hdev,
+ "failed creating buttonpad parameters: %d\n",
+ rc);
+ goto cleanup;
+ }
+ } else {
+ hid_warn(hdev, "pen parameters not found");
+ uclogic_params_init_invalid(&p);
+ }
+
+ break;
}
#undef VID_PID