diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-18 11:55:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-18 11:55:23 -0500 |
commit | 66893885bbf95b6c9030d97804cb678a70804edf (patch) | |
tree | eb390def1c4155cdb9158c6c36281b8f18d3f2d0 | |
parent | ec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff) | |
parent | 029b18361921a0a07b17bd89a2cf20df3d115de8 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: uinput - fix ioctl nr overflow for UI_GET_SYSNAME/VERSION
Input: I8042 - add Acer Aspire 7738 to the nomux list
Input: elantech - support new ICs types for version 4
Input: i8042 - reset keyboard to fix Elantech touchpad detection
MAINTAINERS: remove Dmitry Torokhov's alternate address
-rw-r--r-- | Documentation/kernel-parameters.txt | 1 | ||||
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | drivers/input/mouse/elantech.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 39 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 14 | ||||
-rw-r--r-- | include/uapi/linux/uinput.h | 4 |
6 files changed, 58 insertions, 3 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4df73da11adc..176d4fe4f076 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1277,6 +1277,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1277 | i8042.notimeout [HW] Ignore timeout condition signalled by controller | 1277 | i8042.notimeout [HW] Ignore timeout condition signalled by controller |
1278 | i8042.reset [HW] Reset the controller during init and cleanup | 1278 | i8042.reset [HW] Reset the controller during init and cleanup |
1279 | i8042.unlock [HW] Unlock (ignore) the keylock | 1279 | i8042.unlock [HW] Unlock (ignore) the keylock |
1280 | i8042.kbdreset [HW] Reset device connected to KBD port | ||
1280 | 1281 | ||
1281 | i810= [HW,DRM] | 1282 | i810= [HW,DRM] |
1282 | 1283 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 2fa385321245..2e99241d148d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4930,7 +4930,6 @@ F: include/uapi/linux/inotify.h | |||
4930 | 4930 | ||
4931 | INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS | 4931 | INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS |
4932 | M: Dmitry Torokhov <dmitry.torokhov@gmail.com> | 4932 | M: Dmitry Torokhov <dmitry.torokhov@gmail.com> |
4933 | M: Dmitry Torokhov <dtor@mail.ru> | ||
4934 | L: linux-input@vger.kernel.org | 4933 | L: linux-input@vger.kernel.org |
4935 | Q: http://patchwork.kernel.org/project/linux-input/list/ | 4934 | Q: http://patchwork.kernel.org/project/linux-input/list/ |
4936 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git | 4935 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index f2b978026407..77ecf6d32237 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -1520,6 +1520,8 @@ static int elantech_set_properties(struct elantech_data *etd) | |||
1520 | case 7: | 1520 | case 7: |
1521 | case 8: | 1521 | case 8: |
1522 | case 9: | 1522 | case 9: |
1523 | case 10: | ||
1524 | case 13: | ||
1523 | etd->hw_version = 4; | 1525 | etd->hw_version = 4; |
1524 | break; | 1526 | break; |
1525 | default: | 1527 | default: |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index c66d1b53843e..764857b4e268 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -415,6 +415,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { | |||
415 | }, | 415 | }, |
416 | }, | 416 | }, |
417 | { | 417 | { |
418 | /* Acer Aspire 7738 */ | ||
419 | .matches = { | ||
420 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
421 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7738"), | ||
422 | }, | ||
423 | }, | ||
424 | { | ||
418 | /* Gericom Bellagio */ | 425 | /* Gericom Bellagio */ |
419 | .matches = { | 426 | .matches = { |
420 | DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), | 427 | DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), |
@@ -745,6 +752,35 @@ static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = { | |||
745 | { } | 752 | { } |
746 | }; | 753 | }; |
747 | 754 | ||
755 | /* | ||
756 | * Some laptops need keyboard reset before probing for the trackpad to get | ||
757 | * it detected, initialised & finally work. | ||
758 | */ | ||
759 | static const struct dmi_system_id __initconst i8042_dmi_kbdreset_table[] = { | ||
760 | { | ||
761 | /* Gigabyte P35 v2 - Elantech touchpad */ | ||
762 | .matches = { | ||
763 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | ||
764 | DMI_MATCH(DMI_PRODUCT_NAME, "P35V2"), | ||
765 | }, | ||
766 | }, | ||
767 | { | ||
768 | /* Aorus branded Gigabyte X3 Plus - Elantech touchpad */ | ||
769 | .matches = { | ||
770 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | ||
771 | DMI_MATCH(DMI_PRODUCT_NAME, "X3"), | ||
772 | }, | ||
773 | }, | ||
774 | { | ||
775 | /* Gigabyte P34 - Elantech touchpad */ | ||
776 | .matches = { | ||
777 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | ||
778 | DMI_MATCH(DMI_PRODUCT_NAME, "P34"), | ||
779 | }, | ||
780 | }, | ||
781 | { } | ||
782 | }; | ||
783 | |||
748 | #endif /* CONFIG_X86 */ | 784 | #endif /* CONFIG_X86 */ |
749 | 785 | ||
750 | #ifdef CONFIG_PNP | 786 | #ifdef CONFIG_PNP |
@@ -1040,6 +1076,9 @@ static int __init i8042_platform_init(void) | |||
1040 | if (dmi_check_system(i8042_dmi_dritek_table)) | 1076 | if (dmi_check_system(i8042_dmi_dritek_table)) |
1041 | i8042_dritek = true; | 1077 | i8042_dritek = true; |
1042 | 1078 | ||
1079 | if (dmi_check_system(i8042_dmi_kbdreset_table)) | ||
1080 | i8042_kbdreset = true; | ||
1081 | |||
1043 | /* | 1082 | /* |
1044 | * A20 was already enabled during early kernel init. But some buggy | 1083 | * A20 was already enabled during early kernel init. But some buggy |
1045 | * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to | 1084 | * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 924e4bf357fb..986a71c614b0 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -67,6 +67,10 @@ static bool i8042_notimeout; | |||
67 | module_param_named(notimeout, i8042_notimeout, bool, 0); | 67 | module_param_named(notimeout, i8042_notimeout, bool, 0); |
68 | MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042"); | 68 | MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042"); |
69 | 69 | ||
70 | static bool i8042_kbdreset; | ||
71 | module_param_named(kbdreset, i8042_kbdreset, bool, 0); | ||
72 | MODULE_PARM_DESC(kbdreset, "Reset device connected to KBD port"); | ||
73 | |||
70 | #ifdef CONFIG_X86 | 74 | #ifdef CONFIG_X86 |
71 | static bool i8042_dritek; | 75 | static bool i8042_dritek; |
72 | module_param_named(dritek, i8042_dritek, bool, 0); | 76 | module_param_named(dritek, i8042_dritek, bool, 0); |
@@ -790,6 +794,16 @@ static int __init i8042_check_aux(void) | |||
790 | return -1; | 794 | return -1; |
791 | 795 | ||
792 | /* | 796 | /* |
797 | * Reset keyboard (needed on some laptops to successfully detect | ||
798 | * touchpad, e.g., some Gigabyte laptop models with Elantech | ||
799 | * touchpads). | ||
800 | */ | ||
801 | if (i8042_kbdreset) { | ||
802 | pr_warn("Attempting to reset device connected to KBD port\n"); | ||
803 | i8042_kbd_write(NULL, (unsigned char) 0xff); | ||
804 | } | ||
805 | |||
806 | /* | ||
793 | * Test AUX IRQ delivery to make sure BIOS did not grab the IRQ and | 807 | * Test AUX IRQ delivery to make sure BIOS did not grab the IRQ and |
794 | * used it for a PCI card or somethig else. | 808 | * used it for a PCI card or somethig else. |
795 | */ | 809 | */ |
diff --git a/include/uapi/linux/uinput.h b/include/uapi/linux/uinput.h index baeab83deb64..013c9d8db372 100644 --- a/include/uapi/linux/uinput.h +++ b/include/uapi/linux/uinput.h | |||
@@ -82,7 +82,7 @@ struct uinput_ff_erase { | |||
82 | * The complete sysfs path is then /sys/devices/virtual/input/--NAME-- | 82 | * The complete sysfs path is then /sys/devices/virtual/input/--NAME-- |
83 | * Usually, it is in the form "inputN" | 83 | * Usually, it is in the form "inputN" |
84 | */ | 84 | */ |
85 | #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len) | 85 | #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 44, len) |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * UI_GET_VERSION - Return version of uinput protocol | 88 | * UI_GET_VERSION - Return version of uinput protocol |
@@ -91,7 +91,7 @@ struct uinput_ff_erase { | |||
91 | * the integer pointed to by the ioctl argument. The protocol version | 91 | * the integer pointed to by the ioctl argument. The protocol version |
92 | * is hard-coded in the kernel and is independent of the uinput device. | 92 | * is hard-coded in the kernel and is independent of the uinput device. |
93 | */ | 93 | */ |
94 | #define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 301, unsigned int) | 94 | #define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 45, unsigned int) |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * To write a force-feedback-capable driver, the upload_effect | 97 | * To write a force-feedback-capable driver, the upload_effect |