diff options
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 97 |
1 files changed, 95 insertions, 2 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index d8d49d10f9bb..ef9f4913450d 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -117,6 +117,44 @@ void synaptics_reset(struct psmouse *psmouse) | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | #ifdef CONFIG_MOUSE_PS2_SYNAPTICS | 119 | #ifdef CONFIG_MOUSE_PS2_SYNAPTICS |
| 120 | /* This list has been kindly provided by Synaptics. */ | ||
| 121 | static const char * const topbuttonpad_pnp_ids[] = { | ||
| 122 | "LEN0017", | ||
| 123 | "LEN0018", | ||
| 124 | "LEN0019", | ||
| 125 | "LEN0023", | ||
| 126 | "LEN002A", | ||
| 127 | "LEN002B", | ||
| 128 | "LEN002C", | ||
| 129 | "LEN002D", | ||
| 130 | "LEN002E", | ||
| 131 | "LEN0033", /* Helix */ | ||
| 132 | "LEN0034", /* T431s, T540, X1 Carbon 2nd */ | ||
| 133 | "LEN0035", /* X240 */ | ||
| 134 | "LEN0036", /* T440 */ | ||
| 135 | "LEN0037", | ||
| 136 | "LEN0038", | ||
| 137 | "LEN0041", | ||
| 138 | "LEN0042", /* Yoga */ | ||
| 139 | "LEN0045", | ||
| 140 | "LEN0046", | ||
| 141 | "LEN0047", | ||
| 142 | "LEN0048", | ||
| 143 | "LEN0049", | ||
| 144 | "LEN2000", | ||
| 145 | "LEN2001", | ||
| 146 | "LEN2002", | ||
| 147 | "LEN2003", | ||
| 148 | "LEN2004", /* L440 */ | ||
| 149 | "LEN2005", | ||
| 150 | "LEN2006", | ||
| 151 | "LEN2007", | ||
| 152 | "LEN2008", | ||
| 153 | "LEN2009", | ||
| 154 | "LEN200A", | ||
| 155 | "LEN200B", | ||
| 156 | NULL | ||
| 157 | }; | ||
| 120 | 158 | ||
| 121 | /***************************************************************************** | 159 | /***************************************************************************** |
| 122 | * Synaptics communications functions | 160 | * Synaptics communications functions |
| @@ -1255,8 +1293,10 @@ static void set_abs_position_params(struct input_dev *dev, | |||
| 1255 | input_abs_set_res(dev, y_code, priv->y_res); | 1293 | input_abs_set_res(dev, y_code, priv->y_res); |
| 1256 | } | 1294 | } |
| 1257 | 1295 | ||
| 1258 | static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) | 1296 | static void set_input_params(struct psmouse *psmouse, |
| 1297 | struct synaptics_data *priv) | ||
| 1259 | { | 1298 | { |
| 1299 | struct input_dev *dev = psmouse->dev; | ||
| 1260 | int i; | 1300 | int i; |
| 1261 | 1301 | ||
| 1262 | /* Things that apply to both modes */ | 1302 | /* Things that apply to both modes */ |
| @@ -1325,6 +1365,17 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) | |||
| 1325 | 1365 | ||
| 1326 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { | 1366 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { |
| 1327 | __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); | 1367 | __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); |
| 1368 | /* See if this buttonpad has a top button area */ | ||
| 1369 | if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) { | ||
| 1370 | for (i = 0; topbuttonpad_pnp_ids[i]; i++) { | ||
| 1371 | if (strstr(psmouse->ps2dev.serio->firmware_id, | ||
| 1372 | topbuttonpad_pnp_ids[i])) { | ||
| 1373 | __set_bit(INPUT_PROP_TOPBUTTONPAD, | ||
| 1374 | dev->propbit); | ||
| 1375 | break; | ||
| 1376 | } | ||
| 1377 | } | ||
| 1378 | } | ||
| 1328 | /* Clickpads report only left button */ | 1379 | /* Clickpads report only left button */ |
| 1329 | __clear_bit(BTN_RIGHT, dev->keybit); | 1380 | __clear_bit(BTN_RIGHT, dev->keybit); |
| 1330 | __clear_bit(BTN_MIDDLE, dev->keybit); | 1381 | __clear_bit(BTN_MIDDLE, dev->keybit); |
| @@ -1515,6 +1566,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { | |||
| 1515 | .driver_data = (int []){1232, 5710, 1156, 4696}, | 1566 | .driver_data = (int []){1232, 5710, 1156, 4696}, |
| 1516 | }, | 1567 | }, |
| 1517 | { | 1568 | { |
| 1569 | /* Lenovo ThinkPad T431s */ | ||
| 1570 | .matches = { | ||
| 1571 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 1572 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T431"), | ||
| 1573 | }, | ||
| 1574 | .driver_data = (int []){1024, 5112, 2024, 4832}, | ||
| 1575 | }, | ||
| 1576 | { | ||
| 1518 | /* Lenovo ThinkPad T440s */ | 1577 | /* Lenovo ThinkPad T440s */ |
| 1519 | .matches = { | 1578 | .matches = { |
| 1520 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 1579 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
| @@ -1523,6 +1582,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { | |||
| 1523 | .driver_data = (int []){1024, 5112, 2024, 4832}, | 1582 | .driver_data = (int []){1024, 5112, 2024, 4832}, |
| 1524 | }, | 1583 | }, |
| 1525 | { | 1584 | { |
| 1585 | /* Lenovo ThinkPad L440 */ | ||
| 1586 | .matches = { | ||
| 1587 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 1588 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L440"), | ||
| 1589 | }, | ||
| 1590 | .driver_data = (int []){1024, 5112, 2024, 4832}, | ||
| 1591 | }, | ||
| 1592 | { | ||
| 1526 | /* Lenovo ThinkPad T540p */ | 1593 | /* Lenovo ThinkPad T540p */ |
| 1527 | .matches = { | 1594 | .matches = { |
| 1528 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 1595 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
| @@ -1530,6 +1597,32 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { | |||
| 1530 | }, | 1597 | }, |
| 1531 | .driver_data = (int []){1024, 5056, 2058, 4832}, | 1598 | .driver_data = (int []){1024, 5056, 2058, 4832}, |
| 1532 | }, | 1599 | }, |
| 1600 | { | ||
| 1601 | /* Lenovo ThinkPad L540 */ | ||
| 1602 | .matches = { | ||
| 1603 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 1604 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L540"), | ||
| 1605 | }, | ||
| 1606 | .driver_data = (int []){1024, 5112, 2024, 4832}, | ||
| 1607 | }, | ||
| 1608 | { | ||
| 1609 | /* Lenovo Yoga S1 */ | ||
| 1610 | .matches = { | ||
| 1611 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 1612 | DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, | ||
| 1613 | "ThinkPad S1 Yoga"), | ||
| 1614 | }, | ||
| 1615 | .driver_data = (int []){1232, 5710, 1156, 4696}, | ||
| 1616 | }, | ||
| 1617 | { | ||
| 1618 | /* Lenovo ThinkPad X1 Carbon Haswell (3rd generation) */ | ||
| 1619 | .matches = { | ||
| 1620 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 1621 | DMI_MATCH(DMI_PRODUCT_VERSION, | ||
| 1622 | "ThinkPad X1 Carbon 2nd"), | ||
| 1623 | }, | ||
| 1624 | .driver_data = (int []){1024, 5112, 2024, 4832}, | ||
| 1625 | }, | ||
| 1533 | #endif | 1626 | #endif |
| 1534 | { } | 1627 | { } |
| 1535 | }; | 1628 | }; |
| @@ -1593,7 +1686,7 @@ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode) | |||
| 1593 | priv->capabilities, priv->ext_cap, priv->ext_cap_0c, | 1686 | priv->capabilities, priv->ext_cap, priv->ext_cap_0c, |
| 1594 | priv->board_id, priv->firmware_id); | 1687 | priv->board_id, priv->firmware_id); |
| 1595 | 1688 | ||
| 1596 | set_input_params(psmouse->dev, priv); | 1689 | set_input_params(psmouse, priv); |
| 1597 | 1690 | ||
| 1598 | /* | 1691 | /* |
| 1599 | * Encode touchpad model so that it can be used to set | 1692 | * Encode touchpad model so that it can be used to set |
