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

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

Pull input updates from Dmitry Torokhov:
"Just a few small fixups and switching a couple of Thinkpads to SMBus
for touchpads as PS/2 emulation is not working well"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - enable SMBus on ThinkPad E480 and E580
Input: imx_keypad - make sure keyboard can always wake up system
Input: iqs5xx - get axis info before calling input_mt_init_slots()
Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD
Input: silead - add MSSL0017 to acpi_device_id
Input: elantech - enable middle button support on 2 ThinkPads
Input: elan_i2c - increment wakeup count if wake source

+54 -17
+14 -4
drivers/input/keyboard/imx_keypad.c
··· 526 526 return 0; 527 527 } 528 528 529 - static int __maybe_unused imx_kbd_suspend(struct device *dev) 529 + static int __maybe_unused imx_kbd_noirq_suspend(struct device *dev) 530 530 { 531 531 struct platform_device *pdev = to_platform_device(dev); 532 532 struct imx_keypad *kbd = platform_get_drvdata(pdev); 533 533 struct input_dev *input_dev = kbd->input_dev; 534 + unsigned short reg_val = readw(kbd->mmio_base + KPSR); 534 535 535 536 /* imx kbd can wake up system even clock is disabled */ 536 537 mutex_lock(&input_dev->mutex); ··· 541 540 542 541 mutex_unlock(&input_dev->mutex); 543 542 544 - if (device_may_wakeup(&pdev->dev)) 543 + if (device_may_wakeup(&pdev->dev)) { 544 + if (reg_val & KBD_STAT_KPKD) 545 + reg_val |= KBD_STAT_KRIE; 546 + if (reg_val & KBD_STAT_KPKR) 547 + reg_val |= KBD_STAT_KDIE; 548 + writew(reg_val, kbd->mmio_base + KPSR); 549 + 545 550 enable_irq_wake(kbd->irq); 551 + } 546 552 547 553 return 0; 548 554 } 549 555 550 - static int __maybe_unused imx_kbd_resume(struct device *dev) 556 + static int __maybe_unused imx_kbd_noirq_resume(struct device *dev) 551 557 { 552 558 struct platform_device *pdev = to_platform_device(dev); 553 559 struct imx_keypad *kbd = platform_get_drvdata(pdev); ··· 578 570 return ret; 579 571 } 580 572 581 - static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume); 573 + static const struct dev_pm_ops imx_kbd_pm_ops = { 574 + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx_kbd_noirq_suspend, imx_kbd_noirq_resume) 575 + }; 582 576 583 577 static struct platform_driver imx_keypad_driver = { 584 578 .driver = {
+20 -2
drivers/input/misc/uinput.c
··· 1038 1038 1039 1039 #ifdef CONFIG_COMPAT 1040 1040 1041 - #define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t) 1041 + /* 1042 + * These IOCTLs change their size and thus their numbers between 1043 + * 32 and 64 bits. 1044 + */ 1045 + #define UI_SET_PHYS_COMPAT \ 1046 + _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t) 1047 + #define UI_BEGIN_FF_UPLOAD_COMPAT \ 1048 + _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload_compat) 1049 + #define UI_END_FF_UPLOAD_COMPAT \ 1050 + _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload_compat) 1042 1051 1043 1052 static long uinput_compat_ioctl(struct file *file, 1044 1053 unsigned int cmd, unsigned long arg) 1045 1054 { 1046 - if (cmd == UI_SET_PHYS_COMPAT) 1055 + switch (cmd) { 1056 + case UI_SET_PHYS_COMPAT: 1047 1057 cmd = UI_SET_PHYS; 1058 + break; 1059 + case UI_BEGIN_FF_UPLOAD_COMPAT: 1060 + cmd = UI_BEGIN_FF_UPLOAD; 1061 + break; 1062 + case UI_END_FF_UPLOAD_COMPAT: 1063 + cmd = UI_END_FF_UPLOAD; 1064 + break; 1065 + } 1048 1066 1049 1067 return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg)); 1050 1068 }
+2
drivers/input/mouse/elan_i2c_core.c
··· 981 981 if (error) 982 982 goto out; 983 983 984 + pm_wakeup_event(dev, 0); 985 + 984 986 switch (report[ETP_REPORT_ID_OFFSET]) { 985 987 case ETP_REPORT_ID: 986 988 elan_report_absolute(data, report);
+2
drivers/input/mouse/elantech.c
··· 1189 1189 "LEN2132", /* ThinkPad P52 */ 1190 1190 "LEN2133", /* ThinkPad P72 w/ NFC */ 1191 1191 "LEN2134", /* ThinkPad P72 */ 1192 + "LEN0407", 1193 + "LEN0408", 1192 1194 NULL 1193 1195 }; 1194 1196
+2
drivers/input/mouse/synaptics.c
··· 179 179 "LEN0096", /* X280 */ 180 180 "LEN0097", /* X280 -> ALPS trackpoint */ 181 181 "LEN200f", /* T450s */ 182 + "LEN2054", /* E480 */ 183 + "LEN2055", /* E580 */ 182 184 "SYN3052", /* HP EliteBook 840 G4 */ 183 185 "SYN3221", /* HP 15-ay000 */ 184 186 NULL
+13 -11
drivers/input/touchscreen/iqs5xx.c
··· 502 502 input_set_capability(input, EV_ABS, ABS_MT_POSITION_Y); 503 503 input_set_capability(input, EV_ABS, ABS_MT_PRESSURE); 504 504 505 - error = input_mt_init_slots(input, 506 - IQS5XX_NUM_CONTACTS, INPUT_MT_DIRECT); 507 - if (error) { 508 - dev_err(&client->dev, 509 - "Failed to initialize slots: %d\n", error); 510 - return error; 511 - } 512 - 513 505 input_set_drvdata(input, iqs5xx); 514 506 iqs5xx->input = input; 515 507 } ··· 583 591 if (error) 584 592 return error; 585 593 586 - return iqs5xx_write_word(client, 587 - prop.swap_x_y ? IQS5XX_X_RES : IQS5XX_Y_RES, 588 - max_y); 594 + error = iqs5xx_write_word(client, 595 + prop.swap_x_y ? IQS5XX_X_RES : IQS5XX_Y_RES, 596 + max_y); 597 + if (error) 598 + return error; 599 + 600 + error = input_mt_init_slots(iqs5xx->input, IQS5XX_NUM_CONTACTS, 601 + INPUT_MT_DIRECT); 602 + if (error) 603 + dev_err(&client->dev, "Failed to initialize slots: %d\n", 604 + error); 605 + 606 + return error; 589 607 } 590 608 591 609 static int iqs5xx_dev_init(struct i2c_client *client)
+1
drivers/input/touchscreen/silead.c
··· 609 609 { "MSSL1680", 0 }, 610 610 { "MSSL0001", 0 }, 611 611 { "MSSL0002", 0 }, 612 + { "MSSL0017", 0 }, 612 613 { } 613 614 }; 614 615 MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);