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:
"The changes are all device/driver specific fixes:

- EV_KEY and EV_ABS regression fix for Wacom from Ping Cheng

- BIOS-specific quirk to fix some of the AMD_SFH-based systems, from
Hans de Goede

- other small error handling fixes and device ID additions"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
HID: wacom: set EV_KEY and EV_ABS only for non-HID_GENERIC type of devices
AMD_SFH: Add DMI quirk table for BIOS-es which don't set the activestatus bits
AMD_SFH: Add sensor_mask module parameter
AMD_SFH: Removed unused activecontrolstatus member from the amd_mp2_dev struct
HID: wacom: Assign boolean values to a bool variable
HID cp2112: fix support for multiple gpiochips
HID: alps: fix error return code in alps_input_configured()
HID: asus: Add support for 2021 ASUS N-Key keyboard
HID: google: add don USB id

+59 -20
+37 -3
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
··· 10 10 #include <linux/bitops.h> 11 11 #include <linux/delay.h> 12 12 #include <linux/dma-mapping.h> 13 + #include <linux/dmi.h> 13 14 #include <linux/interrupt.h> 14 15 #include <linux/io-64-nonatomic-lo-hi.h> 15 16 #include <linux/module.h> ··· 23 22 24 23 #define ACEL_EN BIT(0) 25 24 #define GYRO_EN BIT(1) 26 - #define MAGNO_EN BIT(2) 25 + #define MAGNO_EN BIT(2) 27 26 #define ALS_EN BIT(19) 27 + 28 + static int sensor_mask_override = -1; 29 + module_param_named(sensor_mask, sensor_mask_override, int, 0444); 30 + MODULE_PARM_DESC(sensor_mask, "override the detected sensors mask"); 28 31 29 32 void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info) 30 33 { ··· 78 73 writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0); 79 74 } 80 75 76 + static const struct dmi_system_id dmi_sensor_mask_overrides[] = { 77 + { 78 + .matches = { 79 + DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 13-ag0xxx"), 80 + }, 81 + .driver_data = (void *)(ACEL_EN | MAGNO_EN), 82 + }, 83 + { 84 + .matches = { 85 + DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 15-cp0xxx"), 86 + }, 87 + .driver_data = (void *)(ACEL_EN | MAGNO_EN), 88 + }, 89 + { } 90 + }; 91 + 81 92 int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id) 82 93 { 83 94 int activestatus, num_of_sensors = 0; 95 + const struct dmi_system_id *dmi_id; 96 + u32 activecontrolstatus; 84 97 85 - privdata->activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3); 86 - activestatus = privdata->activecontrolstatus >> 4; 98 + if (sensor_mask_override == -1) { 99 + dmi_id = dmi_first_match(dmi_sensor_mask_overrides); 100 + if (dmi_id) 101 + sensor_mask_override = (long)dmi_id->driver_data; 102 + } 103 + 104 + if (sensor_mask_override >= 0) { 105 + activestatus = sensor_mask_override; 106 + } else { 107 + activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3); 108 + activestatus = activecontrolstatus >> 4; 109 + } 110 + 87 111 if (ACEL_EN & activestatus) 88 112 sensor_id[num_of_sensors++] = accel_idx; 89 113
-1
drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
··· 61 61 struct pci_dev *pdev; 62 62 struct amdtp_cl_data *cl_data; 63 63 void __iomem *mmio; 64 - u32 activecontrolstatus; 65 64 }; 66 65 67 66 struct amd_mp2_sensor_info {
+1
drivers/hid/hid-alps.c
··· 761 761 762 762 if (input_register_device(data->input2)) { 763 763 input_free_device(input2); 764 + ret = -ENOENT; 764 765 goto exit; 765 766 } 766 767 }
+3
drivers/hid/hid-asus.c
··· 1222 1222 USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD), 1223 1223 QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD }, 1224 1224 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, 1225 + USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD2), 1226 + QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD }, 1227 + { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, 1225 1228 USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD), 1226 1229 QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES }, 1227 1230 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
+11 -11
drivers/hid/hid-cp2112.c
··· 161 161 atomic_t read_avail; 162 162 atomic_t xfer_avail; 163 163 struct gpio_chip gc; 164 + struct irq_chip irq; 164 165 u8 *in_out_buffer; 165 166 struct mutex lock; 166 167 ··· 1176 1175 return 0; 1177 1176 } 1178 1177 1179 - static struct irq_chip cp2112_gpio_irqchip = { 1180 - .name = "cp2112-gpio", 1181 - .irq_startup = cp2112_gpio_irq_startup, 1182 - .irq_shutdown = cp2112_gpio_irq_shutdown, 1183 - .irq_ack = cp2112_gpio_irq_ack, 1184 - .irq_mask = cp2112_gpio_irq_mask, 1185 - .irq_unmask = cp2112_gpio_irq_unmask, 1186 - .irq_set_type = cp2112_gpio_irq_type, 1187 - }; 1188 - 1189 1178 static int __maybe_unused cp2112_allocate_irq(struct cp2112_device *dev, 1190 1179 int pin) 1191 1180 { ··· 1330 1339 dev->gc.can_sleep = 1; 1331 1340 dev->gc.parent = &hdev->dev; 1332 1341 1342 + dev->irq.name = "cp2112-gpio"; 1343 + dev->irq.irq_startup = cp2112_gpio_irq_startup; 1344 + dev->irq.irq_shutdown = cp2112_gpio_irq_shutdown; 1345 + dev->irq.irq_ack = cp2112_gpio_irq_ack; 1346 + dev->irq.irq_mask = cp2112_gpio_irq_mask; 1347 + dev->irq.irq_unmask = cp2112_gpio_irq_unmask; 1348 + dev->irq.irq_set_type = cp2112_gpio_irq_type; 1349 + dev->irq.flags = IRQCHIP_MASK_ON_SUSPEND; 1350 + 1333 1351 girq = &dev->gc.irq; 1334 - girq->chip = &cp2112_gpio_irqchip; 1352 + girq->chip = &dev->irq; 1335 1353 /* The event comes from the outside so no parent handler */ 1336 1354 girq->parent_handler = NULL; 1337 1355 girq->num_parents = 0;
+2
drivers/hid/hid-google-hammer.c
··· 574 574 575 575 static const struct hid_device_id hammer_devices[] = { 576 576 { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, 577 + USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_DON) }, 578 + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, 577 579 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_HAMMER) }, 578 580 { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, 579 581 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_MAGNEMITE) },
+2
drivers/hid/hid-ids.h
··· 194 194 #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837 195 195 #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822 196 196 #define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD 0x1866 197 + #define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD2 0x19b6 197 198 #define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869 198 199 199 200 #define USB_VENDOR_ID_ATEN 0x0557 ··· 494 493 #define USB_DEVICE_ID_GOOGLE_MASTERBALL 0x503c 495 494 #define USB_DEVICE_ID_GOOGLE_MAGNEMITE 0x503d 496 495 #define USB_DEVICE_ID_GOOGLE_MOONBALL 0x5044 496 + #define USB_DEVICE_ID_GOOGLE_DON 0x5050 497 497 498 498 #define USB_VENDOR_ID_GOTOP 0x08f2 499 499 #define USB_DEVICE_ID_SUPER_Q2 0x007f
+3 -5
drivers/hid/wacom_wac.c
··· 2533 2533 !wacom_wac->shared->is_touch_on) { 2534 2534 if (!wacom_wac->shared->touch_down) 2535 2535 return; 2536 - prox = 0; 2536 + prox = false; 2537 2537 } 2538 2538 2539 2539 wacom_wac->hid_data.num_received++; ··· 3574 3574 { 3575 3575 struct wacom_features *features = &wacom_wac->features; 3576 3576 3577 - input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); 3578 - 3579 3577 if (!(features->device_type & WACOM_DEVICETYPE_PEN)) 3580 3578 return -ENODEV; 3581 3579 ··· 3588 3590 return 0; 3589 3591 } 3590 3592 3593 + input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); 3591 3594 __set_bit(BTN_TOUCH, input_dev->keybit); 3592 3595 __set_bit(ABS_MISC, input_dev->absbit); 3593 3596 ··· 3741 3742 { 3742 3743 struct wacom_features *features = &wacom_wac->features; 3743 3744 3744 - input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); 3745 - 3746 3745 if (!(features->device_type & WACOM_DEVICETYPE_TOUCH)) 3747 3746 return -ENODEV; 3748 3747 ··· 3753 3756 /* setup has already been done */ 3754 3757 return 0; 3755 3758 3759 + input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); 3756 3760 __set_bit(BTN_TOUCH, input_dev->keybit); 3757 3761 3758 3762 if (features->touch_max == 1) {