diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-03 17:58:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-03 17:58:48 -0400 |
commit | 1cced5015b171415169d938fb179c44fe060dc15 (patch) | |
tree | 6bbcc2f3de150af5ecc630fc5d92d5a8ef47d59c | |
parent | 57a9d89dc093d86920748fa706fd55f4fcd2399a (diff) | |
parent | 33096777519a66e632fed7f1e54e6480b4228827 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov:
"A fix for ALPS driver for issue introduced in the latest update and a
tweak for yet another Lenovo box in Synaptics.
There will be more ALPS tweaks coming.."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: define INPUT_PROP_ACCELEROMETER behavior
Input: synaptics - fix min-max quirk value for E440
Input: synaptics - add quirk for Thinkpad E440
Input: ALPS - fix max coordinates for v5 and v7 protocols
Input: add MT_TOOL_PALM
-rw-r--r-- | Documentation/input/event-codes.txt | 6 | ||||
-rw-r--r-- | Documentation/input/multi-touch-protocol.txt | 9 | ||||
-rw-r--r-- | drivers/input/mouse/alps.c | 11 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 7 | ||||
-rw-r--r-- | include/uapi/linux/input.h | 3 |
5 files changed, 26 insertions, 10 deletions
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt index c587a966413e..96705616f582 100644 --- a/Documentation/input/event-codes.txt +++ b/Documentation/input/event-codes.txt | |||
@@ -294,6 +294,12 @@ accordingly. This property does not affect kernel behavior. | |||
294 | The kernel does not provide button emulation for such devices but treats | 294 | The kernel does not provide button emulation for such devices but treats |
295 | them as any other INPUT_PROP_BUTTONPAD device. | 295 | them as any other INPUT_PROP_BUTTONPAD device. |
296 | 296 | ||
297 | INPUT_PROP_ACCELEROMETER | ||
298 | ------------------------- | ||
299 | Directional axes on this device (absolute and/or relative x, y, z) represent | ||
300 | accelerometer data. All other axes retain their meaning. A device must not mix | ||
301 | regular directional axes and accelerometer axes on the same event node. | ||
302 | |||
297 | Guidelines: | 303 | Guidelines: |
298 | ========== | 304 | ========== |
299 | The guidelines below ensure proper single-touch and multi-finger functionality. | 305 | The guidelines below ensure proper single-touch and multi-finger functionality. |
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 7b4f59c09ee2..b85d000faeb4 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -312,9 +312,12 @@ ABS_MT_TOOL_TYPE | |||
312 | 312 | ||
313 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 313 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
314 | between different tool types, such as a finger or a pen. In such cases, the | 314 | between different tool types, such as a finger or a pen. In such cases, the |
315 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and | 315 | event should be omitted. The protocol currently supports MT_TOOL_FINGER, |
316 | MT_TOOL_PEN [2]. For type B devices, this event is handled by input core; | 316 | MT_TOOL_PEN, and MT_TOOL_PALM [2]. For type B devices, this event is handled |
317 | drivers should instead use input_mt_report_slot_state(). | 317 | by input core; drivers should instead use input_mt_report_slot_state(). |
318 | A contact's ABS_MT_TOOL_TYPE may change over time while still touching the | ||
319 | device, because the firmware may not be able to determine which tool is being | ||
320 | used when it first appears. | ||
318 | 321 | ||
319 | ABS_MT_BLOB_ID | 322 | ABS_MT_BLOB_ID |
320 | 323 | ||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 1bd15ebc01f2..33198b91bebf 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -2281,10 +2281,12 @@ static int alps_set_protocol(struct psmouse *psmouse, | |||
2281 | priv->set_abs_params = alps_set_abs_params_mt; | 2281 | priv->set_abs_params = alps_set_abs_params_mt; |
2282 | priv->nibble_commands = alps_v3_nibble_commands; | 2282 | priv->nibble_commands = alps_v3_nibble_commands; |
2283 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; | 2283 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; |
2284 | priv->x_max = 1360; | ||
2285 | priv->y_max = 660; | ||
2286 | priv->x_bits = 23; | 2284 | priv->x_bits = 23; |
2287 | priv->y_bits = 12; | 2285 | priv->y_bits = 12; |
2286 | |||
2287 | if (alps_dolphin_get_device_area(psmouse, priv)) | ||
2288 | return -EIO; | ||
2289 | |||
2288 | break; | 2290 | break; |
2289 | 2291 | ||
2290 | case ALPS_PROTO_V6: | 2292 | case ALPS_PROTO_V6: |
@@ -2303,9 +2305,8 @@ static int alps_set_protocol(struct psmouse *psmouse, | |||
2303 | priv->set_abs_params = alps_set_abs_params_mt; | 2305 | priv->set_abs_params = alps_set_abs_params_mt; |
2304 | priv->nibble_commands = alps_v3_nibble_commands; | 2306 | priv->nibble_commands = alps_v3_nibble_commands; |
2305 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; | 2307 | priv->addr_command = PSMOUSE_CMD_RESET_WRAP; |
2306 | 2308 | priv->x_max = 0xfff; | |
2307 | if (alps_dolphin_get_device_area(psmouse, priv)) | 2309 | priv->y_max = 0x7ff; |
2308 | return -EIO; | ||
2309 | 2310 | ||
2310 | if (priv->fw_ver[1] != 0xba) | 2311 | if (priv->fw_ver[1] != 0xba) |
2311 | priv->flags |= ALPS_BUTTONPAD; | 2312 | priv->flags |= ALPS_BUTTONPAD; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index dda605836546..3b06c8a360b6 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -154,6 +154,11 @@ static const struct min_max_quirk min_max_pnpid_table[] = { | |||
154 | }, | 154 | }, |
155 | { | 155 | { |
156 | (const char * const []){"LEN2006", NULL}, | 156 | (const char * const []){"LEN2006", NULL}, |
157 | {2691, 2691}, | ||
158 | 1024, 5045, 2457, 4832 | ||
159 | }, | ||
160 | { | ||
161 | (const char * const []){"LEN2006", NULL}, | ||
157 | {ANY_BOARD_ID, ANY_BOARD_ID}, | 162 | {ANY_BOARD_ID, ANY_BOARD_ID}, |
158 | 1264, 5675, 1171, 4688 | 163 | 1264, 5675, 1171, 4688 |
159 | }, | 164 | }, |
@@ -189,7 +194,7 @@ static const char * const topbuttonpad_pnp_ids[] = { | |||
189 | "LEN2003", | 194 | "LEN2003", |
190 | "LEN2004", /* L440 */ | 195 | "LEN2004", /* L440 */ |
191 | "LEN2005", | 196 | "LEN2005", |
192 | "LEN2006", | 197 | "LEN2006", /* Edge E440/E540 */ |
193 | "LEN2007", | 198 | "LEN2007", |
194 | "LEN2008", | 199 | "LEN2008", |
195 | "LEN2009", | 200 | "LEN2009", |
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index b0a813079852..2f62ab2d7bf9 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h | |||
@@ -973,7 +973,8 @@ struct input_keymap_entry { | |||
973 | */ | 973 | */ |
974 | #define MT_TOOL_FINGER 0 | 974 | #define MT_TOOL_FINGER 0 |
975 | #define MT_TOOL_PEN 1 | 975 | #define MT_TOOL_PEN 1 |
976 | #define MT_TOOL_MAX 1 | 976 | #define MT_TOOL_PALM 2 |
977 | #define MT_TOOL_MAX 2 | ||
977 | 978 | ||
978 | /* | 979 | /* |
979 | * Values describing the status of a force-feedback effect | 980 | * Values describing the status of a force-feedback effect |