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

From: Benjamin Tissoires
Date: Wed Nov 20 2013 - 09:50:15 EST


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@xxxxxxxxx>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/