toracat / rpms / kernel

Forked from rpms/kernel 5 years ago
Clone

Blame SOURCES/centos-linux-3.10-hid-non-LogiTech-remote-bug5780.patch

b312fc
CentOS-7 patch: Allow non-LogiTech remote to work with a generic wireless
b312fc
keyboard reciever that sends LogiTech scancodes.
b312fc
b312fc
CentOSplus bug: 0005780
b312fc
Submitted by: Alex Timm <alextimm@msn.com>
b312fc
b312fc
LIRCD and devinput driver connected to the HOLTEK USB Keyboard remote reciever,
b312fc
connected on /dev/input/eventx, was not reading the scancodes that should be
b312fc
found in drivers/hid/lg.c.  The following patch adds the scan codes to
b312fc
hid-input.c as they were in centos/centosplus 5.
b312fc
b312fc
Applied by: Akemi Yagi <toracat@centos.org>
b312fc
b312fc
--- a/drivers/hid/hid-input.c   2009-12-02 21:51:21.000000000 -0600
b312fc
+++ b/drivers/hid/hid-input.c   2012-06-20 15:20:04.000000000 -0500
b312fc
@@ -886,7 +886,28 @@ static void hidinput_configure_usage(str
b312fc
 		goto ignore;
b312fc
 
b312fc
 	case HID_UP_LOGIVENDOR:
b312fc
-		goto ignore;
b312fc
+		set_bit(EV_REP, input->evbit);
b312fc
+		switch(usage->hid & HID_USAGE) {
b312fc
+		case 0x004: map_key_clear(KEY_AGAIN);           break;
b312fc
+		case 0x00d: map_key_clear(KEY_HOME);            break;
b312fc
+		case 0x024: map_key_clear(KEY_SHUFFLE);         break;
b312fc
+		case 0x025: map_key_clear(KEY_TV);              break;
b312fc
+		case 0x026: map_key_clear(KEY_MENU);            break;
b312fc
+		case 0x031: map_key_clear(KEY_AUDIO);           break;
b312fc
+		case 0x032: map_key_clear(KEY_TEXT);            break;
b312fc
+		case 0x033: map_key_clear(KEY_LAST);            break;
b312fc
+		case 0x047: map_key_clear(KEY_MP3);             break;
b312fc
+		case 0x048: map_key_clear(KEY_DVD);             break;
b312fc
+		case 0x049: map_key_clear(KEY_MEDIA);           break;
b312fc
+		case 0x04a: map_key_clear(KEY_VIDEO);           break;
b312fc
+		case 0x04b: map_key_clear(KEY_ANGLE);           break;
b312fc
+		case 0x04c: map_key_clear(KEY_LANGUAGE);        break;
b312fc
+		case 0x04d: map_key_clear(KEY_SUBTITLE);        break;
b312fc
+		case 0x051: map_key_clear(KEY_RED);             break;
b312fc
+		case 0x052: map_key_clear(KEY_CLOSE);           break;
b312fc
+		default:    goto ignore;
b312fc
+		}
b312fc
+		break;
b312fc
 
b312fc
 	case HID_UP_PID:
b312fc
 		switch (usage->hid & HID_USAGE) {