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 tag 'input-for-v7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

- new IDs for BETOP BTP-KP50B/C and Razer Wolverine V3 Pro added to
xpad controller driver

- another quirk for new TUXEDO InfinityBook added to i8042

- a small fixup for Synaptics RMI4 driver to properly unlock mutex when
encountering an error in F54

- an update to bcm5974 touch controller driver to reliably switch into
wellspring mode

* tag 'input-for-v7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode
Input: xpad - add support for Razer Wolverine V3 Pro
Input: synaptics-rmi4 - fix a locking bug in an error path
Input: i8042 - add TUXEDO InfinityBook Max 16 Gen10 AMD to i8042 quirk table
Input: bcm5974 - recover from failed mode switch

+55 -3
+5
drivers/input/joystick/xpad.c
··· 313 313 { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, 314 314 { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE }, 315 315 { 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE }, 316 + { 0x1532, 0x0a57, "Razer Wolverine V3 Pro (Wired)", 0, XTYPE_XBOX360 }, 317 + { 0x1532, 0x0a59, "Razer Wolverine V3 Pro (2.4 GHz Dongle)", 0, XTYPE_XBOX360 }, 316 318 { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 }, 317 319 { 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 }, 318 320 { 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 }, ··· 362 360 { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 }, 363 361 { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 }, 364 362 { 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 }, 363 + { 0x20bc, 0x5134, "BETOP BTP-KP50B Xinput Dongle", 0, XTYPE_XBOX360 }, 364 + { 0x20bc, 0x514a, "BETOP BTP-KP50C Xinput Dongle", 0, XTYPE_XBOX360 }, 365 365 { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE }, 366 366 { 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE }, 367 367 { 0x20d6, 0x2064, "PowerA Wired Controller for Xbox", MAP_SHARE_BUTTON, XTYPE_XBOXONE }, ··· 566 562 XPAD_XBOX360_VENDOR(0x1a86), /* Nanjing Qinheng Microelectronics (WCH) */ 567 563 XPAD_XBOX360_VENDOR(0x1bad), /* Harmonix Rock Band guitar and drums */ 568 564 XPAD_XBOX360_VENDOR(0x1ee9), /* ZOTAC Technology Limited */ 565 + XPAD_XBOX360_VENDOR(0x20bc), /* BETOP wireless dongles */ 569 566 XPAD_XBOX360_VENDOR(0x20d6), /* PowerA controllers */ 570 567 XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA controllers */ 571 568 XPAD_XBOX360_VENDOR(0x2345), /* Machenike Controllers */
+41 -1
drivers/input/mouse/bcm5974.c
··· 286 286 const struct tp_finger *index[MAX_FINGERS]; /* finger index data */ 287 287 struct input_mt_pos pos[MAX_FINGERS]; /* position array */ 288 288 int slots[MAX_FINGERS]; /* slot assignments */ 289 + struct work_struct mode_reset_work; 290 + unsigned long last_mode_reset; 289 291 }; 290 292 291 293 /* trackpad finger block data, le16-aligned */ ··· 698 696 return retval; 699 697 } 700 698 699 + /* 700 + * Mode switches sent before the control response are ignored. 701 + * Fixing this state requires switching to normal mode and waiting 702 + * about 1ms before switching back to wellspring mode. 703 + */ 704 + static void bcm5974_mode_reset_work(struct work_struct *work) 705 + { 706 + struct bcm5974 *dev = container_of(work, struct bcm5974, mode_reset_work); 707 + int error; 708 + 709 + guard(mutex)(&dev->pm_mutex); 710 + dev->last_mode_reset = jiffies; 711 + 712 + error = bcm5974_wellspring_mode(dev, false); 713 + if (error) { 714 + dev_err(&dev->intf->dev, "reset to normal mode failed\n"); 715 + return; 716 + } 717 + 718 + fsleep(1000); 719 + 720 + error = bcm5974_wellspring_mode(dev, true); 721 + if (error) 722 + dev_err(&dev->intf->dev, "mode switch after reset failed\n"); 723 + } 724 + 701 725 static void bcm5974_irq_button(struct urb *urb) 702 726 { 703 727 struct bcm5974 *dev = urb->context; ··· 780 752 if (dev->tp_urb->actual_length == 2) 781 753 goto exit; 782 754 783 - if (report_tp_state(dev, dev->tp_urb->actual_length)) 755 + if (report_tp_state(dev, dev->tp_urb->actual_length)) { 784 756 dprintk(1, "bcm5974: bad trackpad package, length: %d\n", 785 757 dev->tp_urb->actual_length); 758 + 759 + /* 760 + * Receiving a HID packet means we aren't in wellspring mode. 761 + * If we haven't tried a reset in the last second, try now. 762 + */ 763 + if (dev->tp_urb->actual_length == 8 && 764 + time_after(jiffies, dev->last_mode_reset + msecs_to_jiffies(1000))) { 765 + schedule_work(&dev->mode_reset_work); 766 + } 767 + } 786 768 787 769 exit: 788 770 error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); ··· 944 906 dev->intf = iface; 945 907 dev->input = input_dev; 946 908 dev->cfg = *cfg; 909 + INIT_WORK(&dev->mode_reset_work, bcm5974_mode_reset_work); 947 910 mutex_init(&dev->pm_mutex); 948 911 949 912 /* setup urbs */ ··· 1037 998 { 1038 999 struct bcm5974 *dev = usb_get_intfdata(iface); 1039 1000 1001 + disable_work_sync(&dev->mode_reset_work); 1040 1002 usb_set_intfdata(iface, NULL); 1041 1003 1042 1004 input_unregister_device(dev->input);
+2 -2
drivers/input/rmi4/rmi_f54.c
··· 538 538 int error; 539 539 int i; 540 540 541 + mutex_lock(&f54->data_mutex); 542 + 541 543 report_size = rmi_f54_get_report_size(f54); 542 544 if (report_size == 0) { 543 545 dev_err(&fn->dev, "Bad report size, report type=%d\n", ··· 547 545 error = -EINVAL; 548 546 goto error; /* retry won't help */ 549 547 } 550 - 551 - mutex_lock(&f54->data_mutex); 552 548 553 549 /* 554 550 * Need to check if command has completed.
+7
drivers/input/serio/i8042-acpipnpio.h
··· 1189 1189 }, 1190 1190 { 1191 1191 .matches = { 1192 + DMI_MATCH(DMI_BOARD_NAME, "X6KK45xU_X6SP45xU"), 1193 + }, 1194 + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | 1195 + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) 1196 + }, 1197 + { 1198 + .matches = { 1192 1199 DMI_MATCH(DMI_BOARD_NAME, "WUJIE Series-X5SP4NAG"), 1193 1200 }, 1194 1201 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |