linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] HID: kye: Add report fixup for Genius Manticore Keyboard
@ 2013-11-20 14:49 Benjamin Tissoires
  2013-11-20 14:49 ` [PATCH 2/2] HID: kye: fix unresponsive keyboard Benjamin Tissoires
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2013-11-20 14:49 UTC (permalink / raw)
  To: Benjamin Tissoires, Jiri Kosina, Adam Kulagowski, linux-input,
	linux-kernel

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

Reported-and-tested-by: Adam Kulagowski <fidor@fidor.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/hid/hid-core.c | 1 +
 drivers/hid/hid-ids.h  | 1 +
 drivers/hid/hid-kye.c  | 5 +++++
 3 files changed, 7 insertions(+)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 9bbbb72..0a82fdb 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -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) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 7655962..c8c7cb1 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -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
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index 7384512..35a4f9c 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -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);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] HID: kye: fix unresponsive keyboard
  2013-11-20 14:49 [PATCH 1/2] HID: kye: Add report fixup for Genius Manticore Keyboard Benjamin Tissoires
@ 2013-11-20 14:49 ` Benjamin Tissoires
  2013-11-21  9:30   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2013-11-20 14:49 UTC (permalink / raw)
  To: Benjamin Tissoires, Jiri Kosina, Adam Kulagowski, linux-input,
	linux-kernel

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.

Reported-and-tested-by: Adam Kulagowski <fidor@fidor.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---

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(+)

diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index 35a4f9c..ecb5ca6 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] HID: kye: fix unresponsive keyboard
  2013-11-20 14:49 ` [PATCH 2/2] HID: kye: fix unresponsive keyboard Benjamin Tissoires
@ 2013-11-21  9:30   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2013-11-21  9:30 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Benjamin Tissoires, Adam Kulagowski, linux-input, linux-kernel

On Wed, 20 Nov 2013, Benjamin Tissoires wrote:

> 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.
> 
> Reported-and-tested-by: Adam Kulagowski <fidor@fidor.org>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> 
> 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.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-21  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 14:49 [PATCH 1/2] HID: kye: Add report fixup for Genius Manticore Keyboard Benjamin Tissoires
2013-11-20 14:49 ` [PATCH 2/2] HID: kye: fix unresponsive keyboard Benjamin Tissoires
2013-11-21  9:30   ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).