mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
HID: kye: Sort kye devices
Sort kye devices by their Produce IDs. Signed-off-by: David Yang <mmyangfl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
4782c0e070
commit
8c7b79bc04
@ -720,10 +720,10 @@
|
||||
#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
|
||||
#define USB_DEVICE_ID_KYE_EASYPEN_I405X 0x5010
|
||||
#define USB_DEVICE_ID_KYE_MOUSEPEN_I608X 0x5011
|
||||
#define USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 0x501a
|
||||
#define USB_DEVICE_ID_KYE_EASYPEN_M610X 0x5013
|
||||
#define USB_DEVICE_ID_KYE_PENSKETCH_M912 0x5015
|
||||
#define USB_DEVICE_ID_KYE_EASYPEN_M406XE 0x5019
|
||||
#define USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 0x501A
|
||||
|
||||
#define USB_VENDOR_ID_LABTEC 0x1020
|
||||
#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006
|
||||
|
@ -329,6 +329,18 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
rdesc[74] = 0x08;
|
||||
}
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE:
|
||||
rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
|
||||
"Genius Gila Gaming Mouse");
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_MANTICORE:
|
||||
rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
|
||||
"Genius Manticore Keyboard");
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
|
||||
rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
|
||||
"Genius Gx Imperator Keyboard");
|
||||
break;
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_I405X:
|
||||
case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
|
||||
case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2:
|
||||
@ -337,18 +349,6 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
case USB_DEVICE_ID_KYE_PENSKETCH_M912:
|
||||
rdesc = kye_tablet_fixup(hdev, rdesc, rsize);
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE:
|
||||
rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
|
||||
"Genius Gila Gaming Mouse");
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
|
||||
rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
|
||||
"Genius Gx Imperator Keyboard");
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_MANTICORE:
|
||||
rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
|
||||
"Genius Manticore Keyboard");
|
||||
break;
|
||||
}
|
||||
return rdesc;
|
||||
}
|
||||
@ -417,18 +417,6 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
}
|
||||
|
||||
switch (id->product) {
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_I405X:
|
||||
case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
|
||||
case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2:
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_M610X:
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_M406XE:
|
||||
case USB_DEVICE_ID_KYE_PENSKETCH_M912:
|
||||
ret = kye_tablet_enable(hdev);
|
||||
if (ret) {
|
||||
hid_err(hdev, "tablet enabling failed\n");
|
||||
goto enabling_err;
|
||||
}
|
||||
break;
|
||||
case USB_DEVICE_ID_GENIUS_MANTICORE:
|
||||
/*
|
||||
* The manticore keyboard needs to have all the interfaces
|
||||
@ -437,6 +425,18 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
if (hid_hw_open(hdev))
|
||||
hid_hw_close(hdev);
|
||||
break;
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_I405X:
|
||||
case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_M610X:
|
||||
case USB_DEVICE_ID_KYE_PENSKETCH_M912:
|
||||
case USB_DEVICE_ID_KYE_EASYPEN_M406XE:
|
||||
case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2:
|
||||
ret = kye_tablet_enable(hdev);
|
||||
if (ret) {
|
||||
hid_err(hdev, "tablet enabling failed\n");
|
||||
goto enabling_err;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -448,24 +448,24 @@ err:
|
||||
|
||||
static const struct hid_device_id kye_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_GENIUS_MANTICORE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_GENIUS_GX_IMPERATOR) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_EASYPEN_I405X) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_EASYPEN_M610X) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_PENSKETCH_M912) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_EASYPEN_M406XE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_GENIUS_GX_IMPERATOR) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_GENIUS_MANTICORE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE,
|
||||
USB_DEVICE_ID_KYE_PENSKETCH_M912) },
|
||||
USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, kye_devices);
|
||||
|
@ -104,12 +104,12 @@ static const struct hid_device_id hid_quirks[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_1f4a), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019), HID_QUIRK_ALWAYS_POLL },
|
||||
|
Loading…
Reference in New Issue
Block a user