Skip to contentSkip to conversation

HID: kye: Add report fixup for Genius Manticore Keyboard

PATCH In review Benjamin Tissoires 2 participants 3 messages Nov 20, 2013 – Nov 21, 2013 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 HID: kye: Add report fixup for Genius Manticore Keyboard

Genius Manticore Keyboard presents the same problem in its report descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard. Use the same fixup.

---
 drivers/hid/hid-core.c | 1 +
 drivers/hid/hid-ids.h  | 1 +
 drivers/hid/hid-kye.c  | 5 +++++
 3 files changed, 7 insertions(+)
drivers/hid/hid-core.c +1 -0
index 9bbbb72..0a82fdb 100644
@@ -1722,6 +1722,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
 	{ 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_ERGO_525V) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
drivers/hid/hid-ids.h +1 -0
index 7655962..c8c7cb1 100644
@@ -489,6 +489,7 @@
 #define USB_VENDOR_ID_KYE		0x0458
 #define USB_DEVICE_ID_KYE_ERGO_525V	0x0087
 #define USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE	0x0138
+#define USB_DEVICE_ID_GENIUS_MANTICORE	0x0153
 #define USB_DEVICE_ID_GENIUS_GX_IMPERATOR	0x4018
 #define USB_DEVICE_ID_KYE_GPEN_560	0x5003
 #define USB_DEVICE_ID_KYE_EASYPEN_I405X	0x5010
drivers/hid/hid-kye.c +5 -0
index 7384512..35a4f9c 100644
@@ -341,6 +341,9 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
 		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
 					"Genius Gx Imperator Keyboard");
+	case USB_DEVICE_ID_GENIUS_MANTICORE:
+		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
+					"Genius Manticore Keyboard");
 		break;
 	}
 	return rdesc;
@@ -439,6 +442,8 @@ static const struct hid_device_id kye_devices[] = {
 				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) },
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, kye_devices);
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/2 HID: kye: fix unresponsive keyboard

The manticore keyboard requires that all usb EP are opened at least once to be fully functional. The third EP forwards to the user space some vendor specific information about the keyboard state, but are useless currently for the kernel.

Opening them and closing them makes the keyboard responsive again.

---

Hi Jiri,

well, this one was a long shot as I do not have the hardware to actually spot the exact call which enables the keyboard. Adam told me that just opening and closing once all the /dev/hidrawX attached to the keyboard makes the keyboard functional, so, here is the kernel version of this. Anyway, it just works, so I think we can take this one as well.

Cheers,
Benjamin

 drivers/hid/hid-kye.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/hid/hid-kye.c +8 -0
index 35a4f9c..ecb5ca6 100644
@@ -421,6 +421,14 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
 			goto enabling_err;
 		}
 		break;
+	case USB_DEVICE_ID_GENIUS_MANTICORE:
+		/*
+		 * The manticore keyboard needs to have all the interfaces
+		 * opened at least once to be fully functional.
+		 */
+		if (hid_hw_open(hdev))
+			hid_hw_close(hdev);
+		break;
 	}
 
 	return 0;
Signature · 1 line
1.8.3.1
#2 lore raw

Re: [PATCH 2/2] HID: kye: fix unresponsive keyboard

Quoted 11 lines · Benjamin Tissoires

The manticore keyboard requires that all usb EP are opened at least once to be fully functional. The third EP forwards to the user space some vendor specific information about the keyboard state, but are useless currently for the kernel.

Opening them and closing them makes the keyboard responsive again.

---

Quoted 7 lines

Hi Jiri,

well, this one was a long shot as I do not have the hardware to actually spot the exact call which enables the keyboard. Adam told me that just opening and closing once all the /dev/hidrawX attached to the keyboard makes the keyboard functional, so, here is the kernel version of this. Anyway, it just works, so I think we can take this one as well.

Man, this is ugly :)

What can we do anyway. Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs