diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 6 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 32 |
2 files changed, 27 insertions, 11 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 939476659ad6..ac471b77c18e 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
@@ -86,7 +86,7 @@ static const u32 tegra_kbc_default_keymap[] = { | |||
86 | KEY(0, 5, KEY_Z), | 86 | KEY(0, 5, KEY_Z), |
87 | KEY(0, 7, KEY_FN), | 87 | KEY(0, 7, KEY_FN), |
88 | 88 | ||
89 | KEY(1, 7, KEY_MENU), | 89 | KEY(1, 7, KEY_LEFTMETA), |
90 | 90 | ||
91 | KEY(2, 6, KEY_RIGHTALT), | 91 | KEY(2, 6, KEY_RIGHTALT), |
92 | KEY(2, 7, KEY_LEFTALT), | 92 | KEY(2, 7, KEY_LEFTALT), |
@@ -355,8 +355,8 @@ static void tegra_kbc_config_pins(struct tegra_kbc *kbc) | |||
355 | for (i = 0; i < KBC_MAX_GPIO; i++) { | 355 | for (i = 0; i < KBC_MAX_GPIO; i++) { |
356 | u32 r_shft = 5 * (i % 6); | 356 | u32 r_shft = 5 * (i % 6); |
357 | u32 c_shft = 4 * (i % 8); | 357 | u32 c_shft = 4 * (i % 8); |
358 | u32 r_mask = 0x1f << r_shift; | 358 | u32 r_mask = 0x1f << r_shft; |
359 | u32 c_mask = 0x0f << c_shift; | 359 | u32 c_mask = 0x0f << c_shft; |
360 | u32 r_offs = (i / 6) * 4 + KBC_ROW_CFG0_0; | 360 | u32 r_offs = (i / 6) * 4 + KBC_ROW_CFG0_0; |
361 | u32 c_offs = (i / 8) * 4 + KBC_COL_CFG0_0; | 361 | u32 c_offs = (i / 8) * 4 + KBC_COL_CFG0_0; |
362 | u32 row_cfg = readl(kbc->mmio + r_offs); | 362 | u32 row_cfg = readl(kbc->mmio + r_offs); |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index da392c22fc6c..aa186cf6c514 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -755,23 +755,26 @@ static int synaptics_reconnect(struct psmouse *psmouse) | |||
755 | { | 755 | { |
756 | struct synaptics_data *priv = psmouse->private; | 756 | struct synaptics_data *priv = psmouse->private; |
757 | struct synaptics_data old_priv = *priv; | 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 | return -1; | 767 | return -1; |
763 | 768 | ||
769 | if (retry > 1) | ||
770 | printk(KERN_DEBUG "Synaptics reconnected after %d tries\n", | ||
771 | retry); | ||
772 | |||
764 | if (synaptics_query_hardware(psmouse)) { | 773 | if (synaptics_query_hardware(psmouse)) { |
765 | printk(KERN_ERR "Unable to query Synaptics hardware.\n"); | 774 | printk(KERN_ERR "Unable to query Synaptics hardware.\n"); |
766 | return -1; | 775 | return -1; |
767 | } | 776 | } |
768 | 777 | ||
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 | |||
775 | if (synaptics_set_absolute_mode(psmouse)) { | 778 | if (synaptics_set_absolute_mode(psmouse)) { |
776 | printk(KERN_ERR "Unable to initialize Synaptics hardware.\n"); | 779 | printk(KERN_ERR "Unable to initialize Synaptics hardware.\n"); |
777 | return -1; | 780 | return -1; |
@@ -782,6 +785,19 @@ static int synaptics_reconnect(struct psmouse *psmouse) | |||
782 | return -1; | 785 | return -1; |
783 | } | 786 | } |
784 | 787 | ||
788 | if (old_priv.identity != priv->identity || | ||
789 | old_priv.model_id != priv->model_id || | ||
790 | old_priv.capabilities != priv->capabilities || | ||
791 | old_priv.ext_cap != priv->ext_cap) { | ||
792 | printk(KERN_ERR "Synaptics hardware appears to be different: " | ||
793 | "id(%ld-%ld), model(%ld-%ld), caps(%lx-%lx), ext(%lx-%lx).\n", | ||
794 | old_priv.identity, priv->identity, | ||
795 | old_priv.model_id, priv->model_id, | ||
796 | old_priv.capabilities, priv->capabilities, | ||
797 | old_priv.ext_cap, priv->ext_cap); | ||
798 | return -1; | ||
799 | } | ||
800 | |||
785 | return 0; | 801 | return 0; |
786 | } | 802 | } |
787 | 803 | ||