Pull input updates from Dmitry Torokhov: - a quirk to AT keyboard driver to skip issuing "GET ID" command when 8042 is in translated mode and the device is a laptop/portable, because the "GET ID" command makes a bunch of recent laptops unhappy - a quirk to i8042 to disable multiplexed mode on Acer P459-G2-M which causes issues on resume - psmouse will activate native RMI4 protocol support for touchpad on ThinkPad L14 G1 - addition of Razer Wolverine V2 ID to xpad gamepad driver - mapping for airplane mode button in soc_button_array driver for TUXEDO laptops - improved error handling in ipaq-micro-keys driver - amimouse being prepared for platform remove callback returning void * tag 'input-for-v6.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: soc_button_array - add mapping for airplane mode button Input: xpad - add Razer Wolverine V2 support Input: ipaq-micro-keys - add error handling for devm_kmemdup Input: amimouse - convert to platform remove callback returning void Input: i8042 - add nomux quirk for Acer P459-G2-M Input: atkbd - skip ATKBD_CMD_GETID in translated mode Input: psmouse - enable Synaptics InterTouch for ThinkPad L14 G1
Unified · Split
| @@ -286,6 +286,7 @@ static const struct xpad_device { · 285 unmodified lines | |||
| 286 | { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, | 286 | { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, |
| 287 | { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, | 287 | { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, |
| 288 | { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE }, | 288 | { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE }, |
| 289 | { 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE }, | ||
| 289 | { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 }, | 290 | { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 }, |
| 290 | { 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 }, | 291 | { 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 }, |
| 291 | { 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 }, | 292 | { 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 }, |
| @@ -765,6 +765,44 @@ static void atkbd_deactivate(struct atkbd *atkbd) · 764 unmodified lines | |||
| 765 | ps2dev->serio->phys); | 765 | ps2dev->serio->phys); |
| 766 | } | 766 | } |
| 767 | 767 | ||
| 768 | #ifdef CONFIG_X86 | ||
| 769 | static bool atkbd_is_portable_device(void) | ||
| 770 | { | ||
| 771 | static const char * const chassis_types[] = { | ||
| 772 | "8", /* Portable */ | ||
| 773 | "9", /* Laptop */ | ||
| 774 | "10", /* Notebook */ | ||
| 775 | "14", /* Sub-Notebook */ | ||
| 776 | "31", /* Convertible */ | ||
| 777 | "32", /* Detachable */ | ||
| 778 | }; | ||
| 779 | int i; | ||
| 780 | |||
| 781 | for (i = 0; i < ARRAY_SIZE(chassis_types); i++) | ||
| 782 | if (dmi_match(DMI_CHASSIS_TYPE, chassis_types[i])) | ||
| 783 | return true; | ||
| 784 | |||
| 785 | return false; | ||
| 786 | } | ||
| 787 | |||
| 788 | /* | ||
| 789 | * On many modern laptops ATKBD_CMD_GETID may cause problems, on these laptops | ||
| 790 | * the controller is always in translated mode. In this mode mice/touchpads will | ||
| 791 | * not work. So in this case simply assume a keyboard is connected to avoid | ||
| 792 | * confusing some laptop keyboards. | ||
| 793 | * | ||
| 794 | * Skipping ATKBD_CMD_GETID ends up using a fake keyboard id. Using a fake id is | ||
| 795 | * ok in translated mode, only atkbd_select_set() checks atkbd->id and in | ||
| 796 | * translated mode that is a no-op. | ||
| 797 | */ | ||
| 798 | static bool atkbd_skip_getid(struct atkbd *atkbd) | ||
| 799 | { | ||
| 800 | return atkbd->translated && atkbd_is_portable_device(); | ||
| 801 | } | ||
| 802 | #else | ||
| 803 | static inline bool atkbd_skip_getid(struct atkbd *atkbd) { return false; } | ||
| 804 | #endif | ||
| 805 | |||
| 768 | /* | 806 | /* |
| 769 | * atkbd_probe() probes for an AT keyboard on a serio port. | 807 | * atkbd_probe() probes for an AT keyboard on a serio port. |
| 770 | */ | 808 | */ |
| @@ -794,12 +832,12 @@ static int atkbd_probe(struct atkbd *atkbd) · 23 unmodified lines | |||
| 794 | */ | 832 | */ |
| 795 | 833 | ||
| 796 | param[0] = param[1] = 0xa5; /* initialize with invalid values */ | 834 | param[0] = param[1] = 0xa5; /* initialize with invalid values */ |
| 797 | if (ps2_command(ps2dev, param, ATKBD_CMD_GETID)) { | 835 | if (atkbd_skip_getid(atkbd) || ps2_command(ps2dev, param, ATKBD_CMD_GETID)) { |
| 798 | 836 | ||
| 799 | /* | 837 | /* |
| 800 | * If the get ID command failed, we check if we can at least set the LEDs on | 838 | * If the get ID command was skipped or failed, we check if we can at least set |
| 801 | * the keyboard. This should work on every keyboard out there. It also turns | 839 | * the LEDs on the keyboard. This should work on every keyboard out there. |
| 802 | * the LEDs off, which we want anyway. | 840 | * It also turns the LEDs off, which we want anyway. |
| 803 | */ | 841 | */ |
| 804 | param[0] = 0; | 842 | param[0] = 0; |
| 805 | if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS)) | 843 | if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS)) |
| @@ -105,6 +105,9 @@ static int micro_key_probe(struct platform_device *pdev) · 104 unmodified lines | |||
| 105 | keys->codes = devm_kmemdup(&pdev->dev, micro_keycodes, | 105 | keys->codes = devm_kmemdup(&pdev->dev, micro_keycodes, |
| 106 | keys->input->keycodesize * keys->input->keycodemax, | 106 | keys->input->keycodesize * keys->input->keycodemax, |
| 107 | GFP_KERNEL); | 107 | GFP_KERNEL); |
| 108 | if (!keys->codes) | ||
| 109 | return -ENOMEM; | ||
| 110 | |||
| 108 | keys->input->keycode = keys->codes; | 111 | keys->input->keycode = keys->codes; |
| 109 | 112 | ||
| 110 | __set_bit(EV_KEY, keys->input->evbit); | 113 | __set_bit(EV_KEY, keys->input->evbit); |
| @@ -299,6 +299,11 @@ static int soc_button_parse_btn_desc(struct device *dev, · 298 unmodified lines | |||
| 299 | info->name = "power"; | 299 | info->name = "power"; |
| 300 | info->event_code = KEY_POWER; | 300 | info->event_code = KEY_POWER; |
| 301 | info->wakeup = true; | 301 | info->wakeup = true; |
| 302 | } else if (upage == 0x01 && usage == 0xc6) { | ||
| 303 | info->name = "airplane mode switch"; | ||
| 304 | info->event_type = EV_SW; | ||
| 305 | info->event_code = SW_RFKILL_ALL; | ||
| 306 | info->active_low = false; | ||
| 302 | } else if (upage == 0x01 && usage == 0xca) { | 307 | } else if (upage == 0x01 && usage == 0xca) { |
| 303 | info->name = "rotation lock switch"; | 308 | info->name = "rotation lock switch"; |
| 304 | info->event_type = EV_SW; | 309 | info->event_type = EV_SW; |
| @@ -125,16 +125,15 @@ static int __init amimouse_probe(struct platform_device *pdev) · 124 unmodified lines | |||
| 125 | return 0; | 125 | return 0; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static int __exit amimouse_remove(struct platform_device *pdev) | 128 | static void __exit amimouse_remove(struct platform_device *pdev) |
| 129 | { | 129 | { |
| 130 | struct input_dev *dev = platform_get_drvdata(pdev); | 130 | struct input_dev *dev = platform_get_drvdata(pdev); |
| 131 | 131 | ||
| 132 | input_unregister_device(dev); | 132 | input_unregister_device(dev); |
| 133 | return 0; | ||
| 134 | } | 133 | } |
| 135 | 134 | ||
| 136 | static struct platform_driver amimouse_driver = { | 135 | static struct platform_driver amimouse_driver = { |
| 137 | .remove = __exit_p(amimouse_remove), | 136 | .remove_new = __exit_p(amimouse_remove), |
| 138 | .driver = { | 137 | .driver = { |
| 139 | .name = "amiga-mouse", | 138 | .name = "amiga-mouse", |
| 140 | }, | 139 | }, |
| @@ -183,6 +183,7 @@ static const char * const smbus_pnp_ids[] = { · 182 unmodified lines | |||
| 183 | "LEN009b", /* T580 */ | 183 | "LEN009b", /* T580 */ |
| 184 | "LEN0402", /* X1 Extreme Gen 2 / P1 Gen 2 */ | 184 | "LEN0402", /* X1 Extreme Gen 2 / P1 Gen 2 */ |
| 185 | "LEN040f", /* P1 Gen 3 */ | 185 | "LEN040f", /* P1 Gen 3 */ |
| 186 | "LEN0411", /* L14 Gen 1 */ | ||
| 186 | "LEN200f", /* T450s */ | 187 | "LEN200f", /* T450s */ |
| 187 | "LEN2044", /* L470 */ | 188 | "LEN2044", /* L470 */ |
| 188 | "LEN2054", /* E480 */ | 189 | "LEN2054", /* E480 */ |
| @@ -360,6 +360,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { · 359 unmodified lines | |||
| 360 | }, | 360 | }, |
| 361 | .driver_data = (void *)(SERIO_QUIRK_DRITEK) | 361 | .driver_data = (void *)(SERIO_QUIRK_DRITEK) |
| 362 | }, | 362 | }, |
| 363 | { | ||
| 364 | /* Acer TravelMate P459-G2-M */ | ||
| 365 | .matches = { | ||
| 366 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
| 367 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate P459-G2-M"), | ||
| 368 | }, | ||
| 369 | .driver_data = (void *)(SERIO_QUIRK_NOMUX) | ||
| 370 | }, | ||
| 363 | { | 371 | { |
| 364 | /* Amoi M636/A737 */ | 372 | /* Amoi M636/A737 */ |
| 365 | .matches = { | 373 | .matches = { |