diff options
-rw-r--r-- | drivers/input/joystick/analog.c | 2 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 9 | ||||
-rw-r--r-- | drivers/input/keyboard/matrix_keypad.c | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/stmpe-keypad.c | 16 | ||||
-rw-r--r-- | drivers/input/mouse/alps.c | 24 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 1 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 7 | ||||
-rw-r--r-- | drivers/input/touchscreen/mms114.c | 15 | ||||
-rw-r--r-- | drivers/input/touchscreen/silead.c | 1 |
9 files changed, 58 insertions, 21 deletions
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index c868a878c84f..a942c4ccd2af 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c | |||
@@ -163,7 +163,7 @@ static unsigned int get_time_pit(void) | |||
163 | #define GET_TIME(x) do { x = (unsigned int)rdtsc(); } while (0) | 163 | #define GET_TIME(x) do { x = (unsigned int)rdtsc(); } while (0) |
164 | #define DELTA(x,y) ((y)-(x)) | 164 | #define DELTA(x,y) ((y)-(x)) |
165 | #define TIME_NAME "TSC" | 165 | #define TIME_NAME "TSC" |
166 | #elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_RISCV) || defined(CONFIG_TILE) | 166 | #elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_PPC) || defined(CONFIG_RISCV) || defined(CONFIG_TILE) |
167 | #define GET_TIME(x) do { x = get_cycles(); } while (0) | 167 | #define GET_TIME(x) do { x = get_cycles(); } while (0) |
168 | #define DELTA(x,y) ((y)-(x)) | 168 | #define DELTA(x,y) ((y)-(x)) |
169 | #define TIME_NAME "get_cycles" | 169 | #define TIME_NAME "get_cycles" |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 9d2688f3f961..06e9650b3b30 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -227,6 +227,7 @@ static const struct xpad_device { | |||
227 | { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, | 227 | { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, |
228 | { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE }, | 228 | { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE }, |
229 | { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, | 229 | { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, |
230 | { 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE }, | ||
230 | { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 }, | 231 | { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 }, |
231 | { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE }, | 232 | { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE }, |
232 | { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 }, | 233 | { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 }, |
@@ -475,7 +476,8 @@ static const u8 xboxone_hori_init[] = { | |||
475 | 476 | ||
476 | /* | 477 | /* |
477 | * This packet is required for some of the PDP pads to start | 478 | * This packet is required for some of the PDP pads to start |
478 | * sending input reports. One of those pads is (0x0e6f:0x02ab). | 479 | * sending input reports. These pads include: (0x0e6f:0x02ab), |
480 | * (0x0e6f:0x02a4). | ||
479 | */ | 481 | */ |
480 | static const u8 xboxone_pdp_init1[] = { | 482 | static const u8 xboxone_pdp_init1[] = { |
481 | 0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14 | 483 | 0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14 |
@@ -483,7 +485,8 @@ static const u8 xboxone_pdp_init1[] = { | |||
483 | 485 | ||
484 | /* | 486 | /* |
485 | * This packet is required for some of the PDP pads to start | 487 | * This packet is required for some of the PDP pads to start |
486 | * sending input reports. One of those pads is (0x0e6f:0x02ab). | 488 | * sending input reports. These pads include: (0x0e6f:0x02ab), |
489 | * (0x0e6f:0x02a4). | ||
487 | */ | 490 | */ |
488 | static const u8 xboxone_pdp_init2[] = { | 491 | static const u8 xboxone_pdp_init2[] = { |
489 | 0x06, 0x20, 0x00, 0x02, 0x01, 0x00 | 492 | 0x06, 0x20, 0x00, 0x02, 0x01, 0x00 |
@@ -521,6 +524,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { | |||
521 | XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), | 524 | XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), |
522 | XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init1), | 525 | XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init1), |
523 | XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2), | 526 | XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2), |
527 | XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init1), | ||
528 | XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init2), | ||
524 | XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), | 529 | XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), |
525 | XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init), | 530 | XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init), |
526 | XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init), | 531 | XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init), |
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index 1f316d66e6f7..41614c185918 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c | |||
@@ -218,8 +218,10 @@ static void matrix_keypad_stop(struct input_dev *dev) | |||
218 | { | 218 | { |
219 | struct matrix_keypad *keypad = input_get_drvdata(dev); | 219 | struct matrix_keypad *keypad = input_get_drvdata(dev); |
220 | 220 | ||
221 | spin_lock_irq(&keypad->lock); | ||
221 | keypad->stopped = true; | 222 | keypad->stopped = true; |
222 | mb(); | 223 | spin_unlock_irq(&keypad->lock); |
224 | |||
223 | flush_work(&keypad->work.work); | 225 | flush_work(&keypad->work.work); |
224 | /* | 226 | /* |
225 | * matrix_keypad_scan() will leave IRQs enabled; | 227 | * matrix_keypad_scan() will leave IRQs enabled; |
diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c index 8c6c0b9109c7..d69e631cfa0a 100644 --- a/drivers/input/keyboard/stmpe-keypad.c +++ b/drivers/input/keyboard/stmpe-keypad.c | |||
@@ -48,6 +48,14 @@ | |||
48 | #define STMPE_KEYPAD_KEYMAP_MAX_SIZE \ | 48 | #define STMPE_KEYPAD_KEYMAP_MAX_SIZE \ |
49 | (STMPE_KEYPAD_MAX_ROWS * STMPE_KEYPAD_MAX_COLS) | 49 | (STMPE_KEYPAD_MAX_ROWS * STMPE_KEYPAD_MAX_COLS) |
50 | 50 | ||
51 | |||
52 | #define STMPE1601_NUM_DATA 5 | ||
53 | #define STMPE2401_NUM_DATA 3 | ||
54 | #define STMPE2403_NUM_DATA 5 | ||
55 | |||
56 | /* Make sure it covers all cases above */ | ||
57 | #define MAX_NUM_DATA 5 | ||
58 | |||
51 | /** | 59 | /** |
52 | * struct stmpe_keypad_variant - model-specific attributes | 60 | * struct stmpe_keypad_variant - model-specific attributes |
53 | * @auto_increment: whether the KPC_DATA_BYTE register address | 61 | * @auto_increment: whether the KPC_DATA_BYTE register address |
@@ -74,7 +82,7 @@ struct stmpe_keypad_variant { | |||
74 | static const struct stmpe_keypad_variant stmpe_keypad_variants[] = { | 82 | static const struct stmpe_keypad_variant stmpe_keypad_variants[] = { |
75 | [STMPE1601] = { | 83 | [STMPE1601] = { |
76 | .auto_increment = true, | 84 | .auto_increment = true, |
77 | .num_data = 5, | 85 | .num_data = STMPE1601_NUM_DATA, |
78 | .num_normal_data = 3, | 86 | .num_normal_data = 3, |
79 | .max_cols = 8, | 87 | .max_cols = 8, |
80 | .max_rows = 8, | 88 | .max_rows = 8, |
@@ -84,7 +92,7 @@ static const struct stmpe_keypad_variant stmpe_keypad_variants[] = { | |||
84 | [STMPE2401] = { | 92 | [STMPE2401] = { |
85 | .auto_increment = false, | 93 | .auto_increment = false, |
86 | .set_pullup = true, | 94 | .set_pullup = true, |
87 | .num_data = 3, | 95 | .num_data = STMPE2401_NUM_DATA, |
88 | .num_normal_data = 2, | 96 | .num_normal_data = 2, |
89 | .max_cols = 8, | 97 | .max_cols = 8, |
90 | .max_rows = 12, | 98 | .max_rows = 12, |
@@ -94,7 +102,7 @@ static const struct stmpe_keypad_variant stmpe_keypad_variants[] = { | |||
94 | [STMPE2403] = { | 102 | [STMPE2403] = { |
95 | .auto_increment = true, | 103 | .auto_increment = true, |
96 | .set_pullup = true, | 104 | .set_pullup = true, |
97 | .num_data = 5, | 105 | .num_data = STMPE2403_NUM_DATA, |
98 | .num_normal_data = 3, | 106 | .num_normal_data = 3, |
99 | .max_cols = 8, | 107 | .max_cols = 8, |
100 | .max_rows = 12, | 108 | .max_rows = 12, |
@@ -156,7 +164,7 @@ static irqreturn_t stmpe_keypad_irq(int irq, void *dev) | |||
156 | struct stmpe_keypad *keypad = dev; | 164 | struct stmpe_keypad *keypad = dev; |
157 | struct input_dev *input = keypad->input; | 165 | struct input_dev *input = keypad->input; |
158 | const struct stmpe_keypad_variant *variant = keypad->variant; | 166 | const struct stmpe_keypad_variant *variant = keypad->variant; |
159 | u8 fifo[variant->num_data]; | 167 | u8 fifo[MAX_NUM_DATA]; |
160 | int ret; | 168 | int ret; |
161 | int i; | 169 | int i; |
162 | 170 | ||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index f0b1060a7fee..0a67f235ba88 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -2530,13 +2530,31 @@ static int alps_update_btn_info_ss4_v2(unsigned char otp[][4], | |||
2530 | } | 2530 | } |
2531 | 2531 | ||
2532 | static int alps_update_dual_info_ss4_v2(unsigned char otp[][4], | 2532 | static int alps_update_dual_info_ss4_v2(unsigned char otp[][4], |
2533 | struct alps_data *priv) | 2533 | struct alps_data *priv, |
2534 | struct psmouse *psmouse) | ||
2534 | { | 2535 | { |
2535 | bool is_dual = false; | 2536 | bool is_dual = false; |
2537 | int reg_val = 0; | ||
2538 | struct ps2dev *ps2dev = &psmouse->ps2dev; | ||
2536 | 2539 | ||
2537 | if (IS_SS4PLUS_DEV(priv->dev_id)) | 2540 | if (IS_SS4PLUS_DEV(priv->dev_id)) { |
2538 | is_dual = (otp[0][0] >> 4) & 0x01; | 2541 | is_dual = (otp[0][0] >> 4) & 0x01; |
2539 | 2542 | ||
2543 | if (!is_dual) { | ||
2544 | /* For support TrackStick of Thinkpad L/E series */ | ||
2545 | if (alps_exit_command_mode(psmouse) == 0 && | ||
2546 | alps_enter_command_mode(psmouse) == 0) { | ||
2547 | reg_val = alps_command_mode_read_reg(psmouse, | ||
2548 | 0xD7); | ||
2549 | } | ||
2550 | alps_exit_command_mode(psmouse); | ||
2551 | ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); | ||
2552 | |||
2553 | if (reg_val == 0x0C || reg_val == 0x1D) | ||
2554 | is_dual = true; | ||
2555 | } | ||
2556 | } | ||
2557 | |||
2540 | if (is_dual) | 2558 | if (is_dual) |
2541 | priv->flags |= ALPS_DUALPOINT | | 2559 | priv->flags |= ALPS_DUALPOINT | |
2542 | ALPS_DUALPOINT_WITH_PRESSURE; | 2560 | ALPS_DUALPOINT_WITH_PRESSURE; |
@@ -2559,7 +2577,7 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse, | |||
2559 | 2577 | ||
2560 | alps_update_btn_info_ss4_v2(otp, priv); | 2578 | alps_update_btn_info_ss4_v2(otp, priv); |
2561 | 2579 | ||
2562 | alps_update_dual_info_ss4_v2(otp, priv); | 2580 | alps_update_dual_info_ss4_v2(otp, priv, psmouse); |
2563 | 2581 | ||
2564 | return 0; | 2582 | return 0; |
2565 | } | 2583 | } |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 0d7c781674ca..60f2c463d1cc 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -173,7 +173,6 @@ static const char * const smbus_pnp_ids[] = { | |||
173 | "LEN0046", /* X250 */ | 173 | "LEN0046", /* X250 */ |
174 | "LEN004a", /* W541 */ | 174 | "LEN004a", /* W541 */ |
175 | "LEN200f", /* T450s */ | 175 | "LEN200f", /* T450s */ |
176 | "LEN2018", /* T460p */ | ||
177 | NULL | 176 | NULL |
178 | }; | 177 | }; |
179 | 178 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 87e84a085a23..b353d494ad40 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -635,6 +635,13 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { | |||
635 | }, | 635 | }, |
636 | }, | 636 | }, |
637 | { | 637 | { |
638 | /* Lenovo ThinkPad L460 */ | ||
639 | .matches = { | ||
640 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
641 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L460"), | ||
642 | }, | ||
643 | }, | ||
644 | { | ||
638 | /* Clevo P650RS, 650RP6, Sager NP8152-S, and others */ | 645 | /* Clevo P650RS, 650RP6, Sager NP8152-S, and others */ |
639 | .matches = { | 646 | .matches = { |
640 | DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), | 647 | DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), |
diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c index db4f6bb502e3..a5ab774da4cc 100644 --- a/drivers/input/touchscreen/mms114.c +++ b/drivers/input/touchscreen/mms114.c | |||
@@ -1,11 +1,8 @@ | |||
1 | /* | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | * Copyright (C) 2012 Samsung Electronics Co.Ltd | 2 | // Melfas MMS114/MMS152 touchscreen device driver |
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | 3 | // |
4 | * | 4 | // Copyright (c) 2012 Samsung Electronics Co., Ltd. |
5 | * This program is free software; you can redistribute it and/or modify | 5 | // Author: Joonyoung Shim <jy0922.shim@samsung.com> |
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | 6 | ||
10 | #include <linux/module.h> | 7 | #include <linux/module.h> |
11 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
@@ -624,4 +621,4 @@ module_i2c_driver(mms114_driver); | |||
624 | /* Module information */ | 621 | /* Module information */ |
625 | MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>"); | 622 | MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>"); |
626 | MODULE_DESCRIPTION("MELFAS mms114 Touchscreen driver"); | 623 | MODULE_DESCRIPTION("MELFAS mms114 Touchscreen driver"); |
627 | MODULE_LICENSE("GPL"); | 624 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c index 646b1e768e6b..ff7043f74a3d 100644 --- a/drivers/input/touchscreen/silead.c +++ b/drivers/input/touchscreen/silead.c | |||
@@ -602,6 +602,7 @@ static const struct acpi_device_id silead_ts_acpi_match[] = { | |||
602 | { "GSL3675", 0 }, | 602 | { "GSL3675", 0 }, |
603 | { "GSL3692", 0 }, | 603 | { "GSL3692", 0 }, |
604 | { "MSSL1680", 0 }, | 604 | { "MSSL1680", 0 }, |
605 | { "MSSL0001", 0 }, | ||
605 | { } | 606 | { } |
606 | }; | 607 | }; |
607 | MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match); | 608 | MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match); |