Skip to content

Commit

Permalink
Merge branch 'for-6.2/upstream-fixes' into for-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Kosina committed Dec 20, 2022
2 parents 7ae545b + 1db1f39 commit 8ac9a8f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/hid/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
{
struct wacom *wacom = hid_get_drvdata(hdev);

if (wacom->wacom_wac.features.type == BOOTLOADER)
return 0;

if (size > WACOM_PKGLEN_MAX)
return 1;

Expand Down Expand Up @@ -2785,6 +2788,11 @@ static int wacom_probe(struct hid_device *hdev,
return error;
}

if (features->type == BOOTLOADER) {
hid_warn(hdev, "Using device in hidraw-only mode");
return hid_hw_start(hdev, HID_CONNECT_HIDRAW);
}

error = wacom_parse_and_register(wacom, false);
if (error)
return error;
Expand Down
4 changes: 4 additions & 0 deletions drivers/hid/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -4882,6 +4882,9 @@ static const struct wacom_features wacom_features_0x3dd =
static const struct wacom_features wacom_features_HID_ANY_ID =
{ "Wacom HID", .type = HID_GENERIC, .oVid = HID_ANY_ID, .oPid = HID_ANY_ID };

static const struct wacom_features wacom_features_0x94 =
{ "Wacom Bootloader", .type = BOOTLOADER };

#define USB_DEVICE_WACOM(prod) \
HID_DEVICE(BUS_USB, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
.driver_data = (kernel_ulong_t)&wacom_features_##prod
Expand Down Expand Up @@ -4955,6 +4958,7 @@ const struct hid_device_id wacom_ids[] = {
{ USB_DEVICE_WACOM(0x84) },
{ USB_DEVICE_WACOM(0x90) },
{ USB_DEVICE_WACOM(0x93) },
{ USB_DEVICE_WACOM(0x94) },
{ USB_DEVICE_WACOM(0x97) },
{ USB_DEVICE_WACOM(0x9A) },
{ USB_DEVICE_WACOM(0x9F) },
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/wacom_wac.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ enum {
MTTPC,
MTTPC_B,
HID_GENERIC,
BOOTLOADER,
MAX_TYPE
};

Expand Down

0 comments on commit 8ac9a8f

Please sign in to comment.