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

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - retry failed resets when reconnecting
Input: synaptics - fix reconnect logic on MT devices
Input: tegra-kbc - fix keymap entry for LeftMeta key
Input: tegra-kbc - fix build error

+27 -11
+3 -3
drivers/input/keyboard/tegra-kbc.c
··· 86 86 KEY(0, 5, KEY_Z), 87 87 KEY(0, 7, KEY_FN), 88 88 89 - KEY(1, 7, KEY_MENU), 89 + KEY(1, 7, KEY_LEFTMETA), 90 90 91 91 KEY(2, 6, KEY_RIGHTALT), 92 92 KEY(2, 7, KEY_LEFTALT), ··· 355 355 for (i = 0; i < KBC_MAX_GPIO; i++) { 356 356 u32 r_shft = 5 * (i % 6); 357 357 u32 c_shft = 4 * (i % 8); 358 - u32 r_mask = 0x1f << r_shift; 359 - u32 c_mask = 0x0f << c_shift; 358 + u32 r_mask = 0x1f << r_shft; 359 + u32 c_mask = 0x0f << c_shft; 360 360 u32 r_offs = (i / 6) * 4 + KBC_ROW_CFG0_0; 361 361 u32 c_offs = (i / 8) * 4 + KBC_COL_CFG0_0; 362 362 u32 row_cfg = readl(kbc->mmio + r_offs);
+24 -8
drivers/input/mouse/synaptics.c
··· 755 755 { 756 756 struct synaptics_data *priv = psmouse->private; 757 757 struct synaptics_data old_priv = *priv; 758 + int retry = 0; 759 + int error; 758 760 759 - psmouse_reset(psmouse); 761 + do { 762 + psmouse_reset(psmouse); 763 + error = synaptics_detect(psmouse, 0); 764 + } while (error && ++retry < 3); 760 765 761 - if (synaptics_detect(psmouse, 0)) 766 + if (error) 762 767 return -1; 768 + 769 + if (retry > 1) 770 + printk(KERN_DEBUG "Synaptics reconnected after %d tries\n", 771 + retry); 763 772 764 773 if (synaptics_query_hardware(psmouse)) { 765 774 printk(KERN_ERR "Unable to query Synaptics hardware.\n"); 766 775 return -1; 767 776 } 768 - 769 - if (old_priv.identity != priv->identity || 770 - old_priv.model_id != priv->model_id || 771 - old_priv.capabilities != priv->capabilities || 772 - old_priv.ext_cap != priv->ext_cap) 773 - return -1; 774 777 775 778 if (synaptics_set_absolute_mode(psmouse)) { 776 779 printk(KERN_ERR "Unable to initialize Synaptics hardware.\n"); ··· 782 779 783 780 if (synaptics_set_advanced_gesture_mode(psmouse)) { 784 781 printk(KERN_ERR "Advanced gesture mode reconnect failed.\n"); 782 + return -1; 783 + } 784 + 785 + if (old_priv.identity != priv->identity || 786 + old_priv.model_id != priv->model_id || 787 + old_priv.capabilities != priv->capabilities || 788 + old_priv.ext_cap != priv->ext_cap) { 789 + printk(KERN_ERR "Synaptics hardware appears to be different: " 790 + "id(%ld-%ld), model(%ld-%ld), caps(%lx-%lx), ext(%lx-%lx).\n", 791 + old_priv.identity, priv->identity, 792 + old_priv.model_id, priv->model_id, 793 + old_priv.capabilities, priv->capabilities, 794 + old_priv.ext_cap, priv->ext_cap); 785 795 return -1; 786 796 } 787 797