Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: topre: Fix n-key rollover on Realforce R3S TKL boards

Newer model R3* Topre Realforce keyboards share an issue with their older
R2 cousins where a report descriptor fixup is needed in order for n-key
rollover to work correctly, otherwise only 6-key rollover is available.
This patch adds some new hardware IDs for the R3S 87-key keyboard and
makes amendments to the existing hid-topre driver in order to change the
correct byte in the new model.

Signed-off-by: Daniel Brackenbury <daniel.brackenbury@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Daniel Brackenbury and committed by
Jiri Kosina
9271af9d 18c966b6

+10 -1
+2 -1
drivers/hid/Kconfig
··· 1169 1169 tristate "Topre REALFORCE keyboards" 1170 1170 depends on HID 1171 1171 help 1172 - Say Y for N-key rollover support on Topre REALFORCE R2 108/87 key keyboards. 1172 + Say Y for N-key rollover support on Topre REALFORCE R2 108/87 key and 1173 + Topre REALFORCE R3S 87 key keyboards. 1173 1174 1174 1175 config HID_THINGM 1175 1176 tristate "ThingM blink(1) USB RGB LED"
+1
drivers/hid/hid-ids.h
··· 1302 1302 #define USB_VENDOR_ID_TOPRE 0x0853 1303 1303 #define USB_DEVICE_ID_TOPRE_REALFORCE_R2_108 0x0148 1304 1304 #define USB_DEVICE_ID_TOPRE_REALFORCE_R2_87 0x0146 1305 + #define USB_DEVICE_ID_TOPRE_REALFORCE_R3S_87 0x0313 1305 1306 1306 1307 #define USB_VENDOR_ID_TOPSEED 0x0766 1307 1308 #define USB_DEVICE_ID_TOPSEED_CYBERLINK 0x0204
+7
drivers/hid/hid-topre.c
··· 29 29 hid_info(hdev, 30 30 "fixing up Topre REALFORCE keyboard report descriptor\n"); 31 31 rdesc[72] = 0x02; 32 + } else if (*rsize >= 106 && rdesc[28] == 0x29 && rdesc[29] == 0xe7 && 33 + rdesc[30] == 0x81 && rdesc[31] == 0x00) { 34 + hid_info(hdev, 35 + "fixing up Topre REALFORCE keyboard report descriptor\n"); 36 + rdesc[31] = 0x02; 32 37 } 33 38 return rdesc; 34 39 } ··· 43 38 USB_DEVICE_ID_TOPRE_REALFORCE_R2_108) }, 44 39 { HID_USB_DEVICE(USB_VENDOR_ID_TOPRE, 45 40 USB_DEVICE_ID_TOPRE_REALFORCE_R2_87) }, 41 + { HID_USB_DEVICE(USB_VENDOR_ID_TOPRE, 42 + USB_DEVICE_ID_TOPRE_REALFORCE_R3S_87) }, 46 43 { } 47 44 }; 48 45 MODULE_DEVICE_TABLE(hid, topre_id_table);