HID: uclogic: Add support for Ugee M540
Add support for Ugee M540 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
This commit is contained in:
parent
0c15efe9ef
commit
9c17f73539
|
@ -897,9 +897,29 @@ int uclogic_params_init(struct uclogic_params *params,
|
||||||
break;
|
break;
|
||||||
case VID_PID(USB_VENDOR_ID_UCLOGIC,
|
case VID_PID(USB_VENDOR_ID_UCLOGIC,
|
||||||
USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U):
|
USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U):
|
||||||
rc = WITH_OPT_DESC(WPXXXXU_ORIG, wp5540u_fixed);
|
if (hdev->dev_rsize == UCLOGIC_RDESC_WP5540U_V2_ORIG_SIZE) {
|
||||||
if (rc != 0)
|
if (bInterfaceNumber == 0) {
|
||||||
goto cleanup;
|
/* Try to 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;
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
hid_warn(hdev,
|
||||||
|
"pen parameters not found");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uclogic_params_init_invalid(&p);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rc = WITH_OPT_DESC(WPXXXXU_ORIG, wp5540u_fixed);
|
||||||
|
if (rc != 0)
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case VID_PID(USB_VENDOR_ID_UCLOGIC,
|
case VID_PID(USB_VENDOR_ID_UCLOGIC,
|
||||||
USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U):
|
USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U):
|
||||||
|
|
|
@ -34,6 +34,9 @@ extern const size_t uclogic_rdesc_wp5540u_fixed_size;
|
||||||
extern __u8 uclogic_rdesc_wp8060u_fixed_arr[];
|
extern __u8 uclogic_rdesc_wp8060u_fixed_arr[];
|
||||||
extern const size_t uclogic_rdesc_wp8060u_fixed_size;
|
extern const size_t uclogic_rdesc_wp8060u_fixed_size;
|
||||||
|
|
||||||
|
/* Size of the original descriptor of the new WP5540U tablet */
|
||||||
|
#define UCLOGIC_RDESC_WP5540U_V2_ORIG_SIZE 232
|
||||||
|
|
||||||
/* Size of the original descriptor of WP1062 tablet */
|
/* Size of the original descriptor of WP1062 tablet */
|
||||||
#define UCLOGIC_RDESC_WP1062_ORIG_SIZE 254
|
#define UCLOGIC_RDESC_WP1062_ORIG_SIZE 254
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue