Skip to content

Commit 00c7b5f

Browse files
committed
Merge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - fixes to ALPS and Focaltech PS/2 drivers dealing with the breakage of switching to -funsigned-char - quirks to i8042 to better handle Lifebook A574/H and TUXEDO devices - a quirk to Goodix touchscreen driver to handle Yoga Book X90F - a fix for incorrectly merged patch to xpad game controller driver * tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix Input: alps - fix compatibility with -funsigned-char Input: focaltech - use explicitly signed char type Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table Input: i8042 - add quirk for Fujitsu Lifebook A574/H
2 parents 93e2b01 + cbedf1a commit 00c7b5f

File tree

5 files changed

+63
-18
lines changed

5 files changed

+63
-18
lines changed

drivers/input/joystick/xpad.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,6 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
781781
input_report_key(dev, BTN_C, data[8]);
782782
input_report_key(dev, BTN_Z, data[9]);
783783

784-
/* Profile button has a value of 0-3, so it is reported as an axis */
785-
if (xpad->mapping & MAP_PROFILE_BUTTON)
786-
input_report_abs(dev, ABS_PROFILE, data[34]);
787784

788785
input_sync(dev);
789786
}
@@ -1061,6 +1058,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
10611058
(__u16) le16_to_cpup((__le16 *)(data + 8)));
10621059
}
10631060

1061+
/* Profile button has a value of 0-3, so it is reported as an axis */
1062+
if (xpad->mapping & MAP_PROFILE_BUTTON)
1063+
input_report_abs(dev, ABS_PROFILE, data[34]);
1064+
10641065
/* paddle handling */
10651066
/* based on SDL's SDL_hidapi_xboxone.c */
10661067
if (xpad->mapping & MAP_PADDLES) {

drivers/input/mouse/alps.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,8 @@ static void alps_process_packet_v6(struct psmouse *psmouse)
852852
x = y = z = 0;
853853

854854
/* Divide 4 since trackpoint's speed is too fast */
855-
input_report_rel(dev2, REL_X, (char)x / 4);
856-
input_report_rel(dev2, REL_Y, -((char)y / 4));
855+
input_report_rel(dev2, REL_X, (s8)x / 4);
856+
input_report_rel(dev2, REL_Y, -((s8)y / 4));
857857

858858
psmouse_report_standard_buttons(dev2, packet[3]);
859859

@@ -1104,8 +1104,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
11041104
((packet[3] & 0x20) << 1);
11051105
z = (packet[5] & 0x3f) | ((packet[3] & 0x80) >> 1);
11061106

1107-
input_report_rel(dev2, REL_X, (char)x);
1108-
input_report_rel(dev2, REL_Y, -((char)y));
1107+
input_report_rel(dev2, REL_X, (s8)x);
1108+
input_report_rel(dev2, REL_Y, -((s8)y));
11091109
input_report_abs(dev2, ABS_PRESSURE, z);
11101110

11111111
psmouse_report_standard_buttons(dev2, packet[1]);
@@ -2294,20 +2294,20 @@ static int alps_get_v3_v7_resolution(struct psmouse *psmouse, int reg_pitch)
22942294
if (reg < 0)
22952295
return reg;
22962296

2297-
x_pitch = (char)(reg << 4) >> 4; /* sign extend lower 4 bits */
2297+
x_pitch = (s8)(reg << 4) >> 4; /* sign extend lower 4 bits */
22982298
x_pitch = 50 + 2 * x_pitch; /* In 0.1 mm units */
22992299

2300-
y_pitch = (char)reg >> 4; /* sign extend upper 4 bits */
2300+
y_pitch = (s8)reg >> 4; /* sign extend upper 4 bits */
23012301
y_pitch = 36 + 2 * y_pitch; /* In 0.1 mm units */
23022302

23032303
reg = alps_command_mode_read_reg(psmouse, reg_pitch + 1);
23042304
if (reg < 0)
23052305
return reg;
23062306

2307-
x_electrode = (char)(reg << 4) >> 4; /* sign extend lower 4 bits */
2307+
x_electrode = (s8)(reg << 4) >> 4; /* sign extend lower 4 bits */
23082308
x_electrode = 17 + x_electrode;
23092309

2310-
y_electrode = (char)reg >> 4; /* sign extend upper 4 bits */
2310+
y_electrode = (s8)reg >> 4; /* sign extend upper 4 bits */
23112311
y_electrode = 13 + y_electrode;
23122312

23132313
x_phys = x_pitch * (x_electrode - 1); /* In 0.1 mm units */

drivers/input/mouse/focaltech.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse,
202202
state->pressed = packet[0] >> 7;
203203
finger1 = ((packet[0] >> 4) & 0x7) - 1;
204204
if (finger1 < FOC_MAX_FINGERS) {
205-
state->fingers[finger1].x += (char)packet[1];
206-
state->fingers[finger1].y += (char)packet[2];
205+
state->fingers[finger1].x += (s8)packet[1];
206+
state->fingers[finger1].y += (s8)packet[2];
207207
} else {
208208
psmouse_err(psmouse, "First finger in rel packet invalid: %d\n",
209209
finger1);
@@ -218,8 +218,8 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse,
218218
*/
219219
finger2 = ((packet[3] >> 4) & 0x7) - 1;
220220
if (finger2 < FOC_MAX_FINGERS) {
221-
state->fingers[finger2].x += (char)packet[4];
222-
state->fingers[finger2].y += (char)packet[5];
221+
state->fingers[finger2].x += (s8)packet[4];
222+
state->fingers[finger2].y += (s8)packet[5];
223223
}
224224
}
225225

drivers/input/serio/i8042-acpipnpio.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
610610
},
611611
.driver_data = (void *)(SERIO_QUIRK_NOMUX)
612612
},
613+
{
614+
/* Fujitsu Lifebook A574/H */
615+
.matches = {
616+
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
617+
DMI_MATCH(DMI_PRODUCT_NAME, "FMVA0501PZ"),
618+
},
619+
.driver_data = (void *)(SERIO_QUIRK_NOMUX)
620+
},
613621
{
614622
/* Gigabyte M912 */
615623
.matches = {
@@ -1116,13 +1124,41 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
11161124
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
11171125
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
11181126
},
1127+
{
1128+
/*
1129+
* Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes
1130+
* the keyboard very laggy for ~5 seconds after boot and
1131+
* sometimes also after resume.
1132+
* However both are required for the keyboard to not fail
1133+
* completely sometimes after boot or resume.
1134+
*/
1135+
.matches = {
1136+
DMI_MATCH(DMI_BOARD_NAME, "N150CU"),
1137+
},
1138+
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1139+
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1140+
},
11191141
{
11201142
.matches = {
11211143
DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
11221144
},
11231145
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
11241146
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
11251147
},
1148+
{
1149+
/*
1150+
* Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes
1151+
* the keyboard very laggy for ~5 seconds after boot and
1152+
* sometimes also after resume.
1153+
* However both are required for the keyboard to not fail
1154+
* completely sometimes after boot or resume.
1155+
*/
1156+
.matches = {
1157+
DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"),
1158+
},
1159+
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1160+
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1161+
},
11261162
{
11271163
.matches = {
11281164
DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),

drivers/input/touchscreen/goodix.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,18 @@ static const unsigned long goodix_irq_flags[] = {
124124
static const struct dmi_system_id nine_bytes_report[] = {
125125
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
126126
{
127-
.ident = "Lenovo YogaBook",
128-
/* YB1-X91L/F and YB1-X90L/F */
127+
/* Lenovo Yoga Book X90F / X90L */
129128
.matches = {
130-
DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9")
129+
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
130+
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
131+
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
132+
}
133+
},
134+
{
135+
/* Lenovo Yoga Book X91F / X91L */
136+
.matches = {
137+
/* Non exact match to match F + L versions */
138+
DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"),
131139
}
132140
},
133141
#endif

0 commit comments

Comments
 (0)