Comment 26 for bug 405390

Revision history for this message
jmharris (jmharris) wrote :

Hi Robert, here are the basic notes of what I've done so far. I'm putting these on the bugzilla.kernel.org as well as I presume that's closer to the people who commit to the kernel.

The USB resource description (for the keyboard part of the device) is:
05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01 75 01 95 08 81 02 95 01 75 08 81 01 95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03 91 01 05 07 19 00 29 91 15 00 25 01 75 08 95 06 81 00 c0

When you cat the relevant rdesc for the device in /sys/kernel/debug/hid this indicates Field(1) has a usage of 146 but the logical maximum is 1. I see from the kernel source code that resource descriptor fixes have been done for other HID devices so I hacked in the manufacturer and device id (0x05a4 and 0x2000 respectively) into hid-ids.h. Then I consulted the USB specification and hijacked the sunplus keyboard quirk driver code to modify the appropriate rdesc bytes simply as follows:

rdesc[55] = 0xff;

Obviously this raises the logical maximum to 255, that may be excessive. Need to review what a sane value for this should be.

I also have the MULTI_INPUT quirk enabled by altering hid-quirks.c which gives me several more /dev/input/event devices for the keyboard and trackpad on this device, but that was done before the rdesc fix- maybe it is not important in order to get the main keyboard working.

For anyone who can't wait for a patch (fair enough) I made these changes against 2.6.32.1 but it's pretty trivial- I think for older kernels the quirk code structure was a little different though.