diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-07 11:46:23 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-07 11:46:23 -0400 |
commit | 5f63e885ac32429fc1340f5a61e1484022efc773 (patch) | |
tree | f9a21a6902e1857274775b96d561d8be17287860 /drivers/input | |
parent | b6d2d3289f84e9c7449dff04fb959e29207acd80 (diff) | |
parent | f22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff) |
Merge tag 'v4.0-rc7' into next
Sync up with Linux 4.0-rc7 to bring in ALPS changes.
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/mouse/alps.c | 48 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 7 |
2 files changed, 35 insertions, 20 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 1bd15ebc01f2..27bcdbc950c9 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -1154,10 +1154,28 @@ out: | |||
1154 | mutex_unlock(&alps_mutex); | 1154 | mutex_unlock(&alps_mutex); |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | static void alps_report_bare_ps2_packet(struct input_dev *dev, | 1157 | static void alps_report_bare_ps2_packet(struct psmouse *psmouse, |
1158 | unsigned char packet[], | 1158 | unsigned char packet[], |
1159 | bool report_buttons) | 1159 | bool report_buttons) |
1160 | { | 1160 | { |
1161 | struct alps_data *priv = psmouse->private; | ||
1162 | struct input_dev *dev; | ||
1163 | |||
1164 | /* Figure out which device to use to report the bare packet */ | ||
1165 | if (priv->proto_version == ALPS_PROTO_V2 && | ||
1166 | (priv->flags & ALPS_DUALPOINT)) { | ||
1167 | /* On V2 devices the DualPoint Stick reports bare packets */ | ||
1168 | dev = priv->dev2; | ||
1169 | } else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) { | ||
1170 | /* Register dev3 mouse if we received PS/2 packet first time */ | ||
1171 | if (!IS_ERR(priv->dev3)) | ||
1172 | psmouse_queue_work(psmouse, &priv->dev3_register_work, | ||
1173 | 0); | ||
1174 | return; | ||
1175 | } else { | ||
1176 | dev = priv->dev3; | ||
1177 | } | ||
1178 | |||
1161 | if (report_buttons) | 1179 | if (report_buttons) |
1162 | alps_report_buttons(dev, NULL, | 1180 | alps_report_buttons(dev, NULL, |
1163 | packet[0] & 1, packet[0] & 2, packet[0] & 4); | 1181 | packet[0] & 1, packet[0] & 2, packet[0] & 4); |
@@ -1232,8 +1250,8 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) | |||
1232 | * de-synchronization. | 1250 | * de-synchronization. |
1233 | */ | 1251 | */ |
1234 | 1252 | ||
1235 | alps_report_bare_ps2_packet(priv->dev2, | 1253 | alps_report_bare_ps2_packet(psmouse, &psmouse->packet[3], |
1236 | &psmouse->packet[3], false); | 1254 | false); |
1237 | 1255 | ||
1238 | /* | 1256 | /* |
1239 | * Continue with the standard ALPS protocol handling, | 1257 | * Continue with the standard ALPS protocol handling, |
@@ -1289,18 +1307,9 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) | |||
1289 | * properly we only do this if the device is fully synchronized. | 1307 | * properly we only do this if the device is fully synchronized. |
1290 | */ | 1308 | */ |
1291 | if (!psmouse->out_of_sync_cnt && (psmouse->packet[0] & 0xc8) == 0x08) { | 1309 | if (!psmouse->out_of_sync_cnt && (psmouse->packet[0] & 0xc8) == 0x08) { |
1292 | |||
1293 | /* Register dev3 mouse if we received PS/2 packet first time */ | ||
1294 | if (unlikely(!priv->dev3)) | ||
1295 | psmouse_queue_work(psmouse, | ||
1296 | &priv->dev3_register_work, 0); | ||
1297 | |||
1298 | if (psmouse->pktcnt == 3) { | 1310 | if (psmouse->pktcnt == 3) { |
1299 | /* Once dev3 mouse device is registered report data */ | 1311 | alps_report_bare_ps2_packet(psmouse, psmouse->packet, |
1300 | if (likely(!IS_ERR_OR_NULL(priv->dev3))) | 1312 | true); |
1301 | alps_report_bare_ps2_packet(priv->dev3, | ||
1302 | psmouse->packet, | ||
1303 | true); | ||
1304 | return PSMOUSE_FULL_PACKET; | 1313 | return PSMOUSE_FULL_PACKET; |
1305 | } | 1314 | } |
1306 | return PSMOUSE_GOOD_DATA; | 1315 | return PSMOUSE_GOOD_DATA; |
@@ -2281,10 +2290,12 @@ static int alps_set_protocol(struct psmouse *psmouse, | |||
2281 | priv->set_abs_params = alps_set_abs_params_mt; | 2290 | priv->set_abs_params = alps_set_abs_params_mt; |
2282 | priv->nibble_commands = alps_v3_nibble_commands; | 2291 | priv->nibble_commands = alps_v3_nibble_commands; |
2283 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; | 2292 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; |
2284 | priv->x_max = 1360; | ||
2285 | priv->y_max = 660; | ||
2286 | priv->x_bits = 23; | 2293 | priv->x_bits = 23; |
2287 | priv->y_bits = 12; | 2294 | priv->y_bits = 12; |
2295 | |||
2296 | if (alps_dolphin_get_device_area(psmouse, priv)) | ||
2297 | return -EIO; | ||
2298 | |||
2288 | break; | 2299 | break; |
2289 | 2300 | ||
2290 | case ALPS_PROTO_V6: | 2301 | case ALPS_PROTO_V6: |
@@ -2303,9 +2314,8 @@ static int alps_set_protocol(struct psmouse *psmouse, | |||
2303 | priv->set_abs_params = alps_set_abs_params_mt; | 2314 | priv->set_abs_params = alps_set_abs_params_mt; |
2304 | priv->nibble_commands = alps_v3_nibble_commands; | 2315 | priv->nibble_commands = alps_v3_nibble_commands; |
2305 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; | 2316 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; |
2306 | 2317 | priv->x_max = 0xfff; | |
2307 | if (alps_dolphin_get_device_area(psmouse, priv)) | 2318 | priv->y_max = 0x7ff; |
2308 | return -EIO; | ||
2309 | 2319 | ||
2310 | if (priv->fw_ver[1] != 0xba) | 2320 | if (priv->fw_ver[1] != 0xba) |
2311 | priv->flags |= ALPS_BUTTONPAD; | 2321 | priv->flags |= ALPS_BUTTONPAD; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 95898333834f..630af73e98c4 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -157,6 +157,11 @@ static const struct min_max_quirk min_max_pnpid_table[] = { | |||
157 | }, | 157 | }, |
158 | { | 158 | { |
159 | (const char * const []){"LEN2006", NULL}, | 159 | (const char * const []){"LEN2006", NULL}, |
160 | {2691, 2691}, | ||
161 | 1024, 5045, 2457, 4832 | ||
162 | }, | ||
163 | { | ||
164 | (const char * const []){"LEN2006", NULL}, | ||
160 | {ANY_BOARD_ID, ANY_BOARD_ID}, | 165 | {ANY_BOARD_ID, ANY_BOARD_ID}, |
161 | 1264, 5675, 1171, 4688 | 166 | 1264, 5675, 1171, 4688 |
162 | }, | 167 | }, |
@@ -192,7 +197,7 @@ static const char * const topbuttonpad_pnp_ids[] = { | |||
192 | "LEN2003", | 197 | "LEN2003", |
193 | "LEN2004", /* L440 */ | 198 | "LEN2004", /* L440 */ |
194 | "LEN2005", | 199 | "LEN2005", |
195 | "LEN2006", | 200 | "LEN2006", /* Edge E440/E540 */ |
196 | "LEN2007", | 201 | "LEN2007", |
197 | "LEN2008", | 202 | "LEN2008", |
198 | "LEN2009", | 203 | "LEN2009", |