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.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fixes from Jiri Kosina:

- build dependency fix for hid-asus from Arnd Bergmann

- addition of omitted mapping of _ASSISTANT key from Dmitry Torokhov

- race condition fix in hid-debug inftastructure from He, Bo

- fixed support for devices with big maximum report size from Kai-Heng
Feng

- deadlock fix in hid-steam from Rodrigo Rivas Costa

- quite a few device-specific quirks

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
HID: input: add mapping for Assistant key
HID: i2c-hid: Disable runtime PM on Synaptics touchpad
HID: quirks: Fix keyboard + touchpad on Lenovo Miix 630
HID: logitech: Handle 0 scroll events for the m560
HID: debug: fix race condition with between rdesc_show() and device removal
HID: logitech: check the return value of create_singlethread_workqueue
HID: Increase maximum report size allowed by hid_field_extract()
HID: steam: fix deadlock with input devices.
HID: uclogic: remove redudant duplicated null check on ver_ptr
HID: quirks: Drop misused kernel-doc annotation
HID: hid-asus: select CONFIG_POWER_SUPPLY
HID: quirks: use correct format chars in dbg_hid

+50 -22
+1
drivers/hid/Kconfig
··· 150 150 tristate "Asus" 151 151 depends on LEDS_CLASS 152 152 depends on ASUS_WMI || ASUS_WMI=n 153 + select POWER_SUPPLY 153 154 ---help--- 154 155 Support for Asus notebook built-in keyboard and touchpad via i2c, and 155 156 the Asus Republic of Gamers laptop keyboard special keys.
+3 -3
drivers/hid/hid-core.c
··· 1301 1301 u32 hid_field_extract(const struct hid_device *hid, u8 *report, 1302 1302 unsigned offset, unsigned n) 1303 1303 { 1304 - if (n > 32) { 1305 - hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n", 1304 + if (n > 256) { 1305 + hid_warn(hid, "hid_field_extract() called with n (%d) > 256! (%s)\n", 1306 1306 n, current->comm); 1307 - n = 32; 1307 + n = 256; 1308 1308 } 1309 1309 1310 1310 return __extract(report, offset, n);
+5
drivers/hid/hid-debug.c
··· 1060 1060 seq_printf(f, "\n\n"); 1061 1061 1062 1062 /* dump parsed data and input mappings */ 1063 + if (down_interruptible(&hdev->driver_input_lock)) 1064 + return 0; 1065 + 1063 1066 hid_dump_device(hdev, f); 1064 1067 seq_printf(f, "\n"); 1065 1068 hid_dump_input_mapping(hdev, f); 1069 + 1070 + up(&hdev->driver_input_lock); 1066 1071 1067 1072 return 0; 1068 1073 }
+1
drivers/hid/hid-ids.h
··· 1083 1083 #define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3 1084 1084 #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3 1085 1085 #define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710 1086 + #define I2C_DEVICE_ID_SYNAPTICS_7E7E 0x7e7e 1086 1087 1087 1088 #define USB_VENDOR_ID_TEXAS_INSTRUMENTS 0x2047 1088 1089 #define USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA 0x0855
+1
drivers/hid/hid-input.c
··· 998 998 case 0x1b8: map_key_clear(KEY_VIDEO); break; 999 999 case 0x1bc: map_key_clear(KEY_MESSENGER); break; 1000 1000 case 0x1bd: map_key_clear(KEY_INFO); break; 1001 + case 0x1cb: map_key_clear(KEY_ASSISTANT); break; 1001 1002 case 0x201: map_key_clear(KEY_NEW); break; 1002 1003 case 0x202: map_key_clear(KEY_OPEN); break; 1003 1004 case 0x203: map_key_clear(KEY_CLOSE); break;
+10 -3
drivers/hid/hid-logitech-hidpp.c
··· 2111 2111 kfree(data); 2112 2112 return -ENOMEM; 2113 2113 } 2114 + data->wq = create_singlethread_workqueue("hidpp-ff-sendqueue"); 2115 + if (!data->wq) { 2116 + kfree(data->effect_ids); 2117 + kfree(data); 2118 + return -ENOMEM; 2119 + } 2120 + 2114 2121 data->hidpp = hidpp; 2115 2122 data->feature_index = feature_index; 2116 2123 data->version = version; ··· 2162 2155 /* ignore boost value at response.fap.params[2] */ 2163 2156 2164 2157 /* init the hardware command queue */ 2165 - data->wq = create_singlethread_workqueue("hidpp-ff-sendqueue"); 2166 2158 atomic_set(&data->workqueue_size, 0); 2167 2159 2168 2160 /* initialize with zero autocenter to get wheel in usable state */ ··· 2614 2608 input_report_rel(mydata->input, REL_Y, v); 2615 2609 2616 2610 v = hid_snto32(data[6], 8); 2617 - hidpp_scroll_counter_handle_scroll( 2618 - &hidpp->vertical_wheel_counter, v); 2611 + if (v != 0) 2612 + hidpp_scroll_counter_handle_scroll( 2613 + &hidpp->vertical_wheel_counter, v); 2619 2614 2620 2615 input_sync(mydata->input); 2621 2616 }
+7 -4
drivers/hid/hid-quirks.c
··· 715 715 { HID_USB_DEVICE(USB_VENDOR_ID_DEALEXTREAME, USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701) }, 716 716 { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, 717 717 { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, 718 - { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, 0x0400) }, 719 718 { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, 720 719 { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, 721 720 { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, ··· 854 855 { } 855 856 }; 856 857 857 - /** 858 + /* 858 859 * hid_mouse_ignore_list - mouse devices which should not be handled by the hid layer 859 860 * 860 861 * There are composite devices for which we want to ignore only a certain ··· 995 996 if (hdev->product == 0x0401 && 996 997 strncmp(hdev->name, "ELAN0800", 8) != 0) 997 998 return true; 999 + /* Same with product id 0x0400 */ 1000 + if (hdev->product == 0x0400 && 1001 + strncmp(hdev->name, "QTEC0001", 8) != 0) 1002 + return true; 998 1003 break; 999 1004 } 1000 1005 ··· 1045 1042 } 1046 1043 1047 1044 if (bl_entry != NULL) 1048 - dbg_hid("Found dynamic quirk 0x%lx for HID device 0x%hx:0x%hx\n", 1045 + dbg_hid("Found dynamic quirk 0x%lx for HID device 0x%04x:0x%04x\n", 1049 1046 bl_entry->driver_data, bl_entry->vendor, 1050 1047 bl_entry->product); 1051 1048 ··· 1212 1209 quirks |= bl_entry->driver_data; 1213 1210 1214 1211 if (quirks) 1215 - dbg_hid("Found squirk 0x%lx for HID device 0x%hx:0x%hx\n", 1212 + dbg_hid("Found squirk 0x%lx for HID device 0x%04x:0x%04x\n", 1216 1213 quirks, hdev->vendor, hdev->product); 1217 1214 return quirks; 1218 1215 }
+20 -8
drivers/hid/hid-steam.c
··· 499 499 static int steam_register(struct steam_device *steam) 500 500 { 501 501 int ret; 502 + bool client_opened; 502 503 503 504 /* 504 505 * This function can be called several times in a row with the ··· 512 511 * Unlikely, but getting the serial could fail, and it is not so 513 512 * important, so make up a serial number and go on. 514 513 */ 514 + mutex_lock(&steam->mutex); 515 515 if (steam_get_serial(steam) < 0) 516 516 strlcpy(steam->serial_no, "XXXXXXXXXX", 517 517 sizeof(steam->serial_no)); 518 + mutex_unlock(&steam->mutex); 518 519 519 520 hid_info(steam->hdev, "Steam Controller '%s' connected", 520 521 steam->serial_no); ··· 531 528 } 532 529 533 530 mutex_lock(&steam->mutex); 534 - if (!steam->client_opened) { 531 + client_opened = steam->client_opened; 532 + if (!client_opened) 535 533 steam_set_lizard_mode(steam, lizard_mode); 536 - ret = steam_input_register(steam); 537 - } else { 538 - ret = 0; 539 - } 540 534 mutex_unlock(&steam->mutex); 535 + 536 + if (!client_opened) 537 + ret = steam_input_register(steam); 538 + else 539 + ret = 0; 541 540 542 541 return ret; 543 542 } ··· 635 630 { 636 631 struct steam_device *steam = hdev->driver_data; 637 632 633 + unsigned long flags; 634 + bool connected; 635 + 636 + spin_lock_irqsave(&steam->lock, flags); 637 + connected = steam->connected; 638 + spin_unlock_irqrestore(&steam->lock, flags); 639 + 638 640 mutex_lock(&steam->mutex); 639 641 steam->client_opened = false; 642 + if (connected) 643 + steam_set_lizard_mode(steam, lizard_mode); 640 644 mutex_unlock(&steam->mutex); 641 645 642 - if (steam->connected) { 643 - steam_set_lizard_mode(steam, lizard_mode); 646 + if (connected) 644 647 steam_input_register(steam); 645 - } 646 648 } 647 649 648 650 static int steam_client_ll_raw_request(struct hid_device *hdev,
-4
drivers/hid/hid-uclogic-params.c
··· 735 735 goto cleanup; 736 736 } 737 737 rc = usb_string(udev, 201, ver_ptr, ver_len); 738 - if (ver_ptr == NULL) { 739 - rc = -ENOMEM; 740 - goto cleanup; 741 - } 742 738 if (rc == -EPIPE) { 743 739 *ver_ptr = '\0'; 744 740 } else if (rc < 0) {
+2
drivers/hid/i2c-hid/i2c-hid-core.c
··· 184 184 I2C_HID_QUIRK_NO_RUNTIME_PM }, 185 185 { USB_VENDOR_ID_ELAN, HID_ANY_ID, 186 186 I2C_HID_QUIRK_BOGUS_IRQ }, 187 + { USB_VENDOR_ID_SYNAPTICS, I2C_DEVICE_ID_SYNAPTICS_7E7E, 188 + I2C_HID_QUIRK_NO_RUNTIME_PM }, 187 189 { 0, 0 } 188 190 }; 189 191