Skip to content

Commit 10a0e84

Browse files
committed
Merge tag 'input-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - a quirk for i8042 to better handle another TUXEDO model - a quirk to atkbd to handle incorcet behavior of HONOR FMB-P internal keyboard - a definition for a new ABS_SND_PROFILE event - fixes to alps and lkkbd drivers to reliably shut down pending work on removal - a fix to apple_z2 driver tightening input report parsing - a fix for "off-by-one" error when validating config in ti_am335x_tsc driver - addition of CRKD Guitars device IDs to xpad driver. * tag 'input-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ti_am335x_tsc - fix off-by-one error in wire_order validation Input: xpad - add support for CRKD Guitars Input: add ABS_SND_PROFILE Input: apple_z2 - fix reading incorrect reports after exiting sleep Input: alps - fix use-after-free bugs caused by dev3_register_work Input: i8042 - add TUXEDO InfinityBook Max Gen10 AMD to i8042 quirk table Input: atkbd - skip deactivate for HONOR FMB-P's internal keyboard Input: lkkbd - disable pending work before freeing device
2 parents 765b233 + 248d3a7 commit 10a0e84

10 files changed

Lines changed: 45 additions & 2 deletions

File tree

Documentation/input/event-codes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ A few EV_ABS codes have special meanings:
241241
emitted only when the selected profile changes, indicating the newly
242242
selected profile value.
243243

244+
* ABS_SND_PROFILE:
245+
246+
- Used to describe the state of a multi-value sound profile switch.
247+
An event is emitted only when the selected profile changes,
248+
indicating the newly selected profile value.
249+
244250
* ABS_MT_<name>:
245251

246252
- Used to describe multitouch input events. Please see

drivers/hid/hid-debug.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,6 +3513,7 @@ static const char *absolutes[ABS_CNT] = {
35133513
[ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt",
35143514
[ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "ToolWidth",
35153515
[ABS_VOLUME] = "Volume", [ABS_PROFILE] = "Profile",
3516+
[ABS_SND_PROFILE] = "SoundProfile",
35163517
[ABS_MISC] = "Misc",
35173518
[ABS_MT_SLOT] = "MTSlot",
35183519
[ABS_MT_TOUCH_MAJOR] = "MTMajor",

drivers/input/joystick/xpad.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ static const struct xpad_device {
133133
} xpad_device[] = {
134134
/* Please keep this list sorted by vendor and product ID. */
135135
{ 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
136+
{ 0x0351, 0x1000, "CRKD LP Blueberry Burst Pro Edition (Xbox)", 0, XTYPE_XBOX360 },
137+
{ 0x0351, 0x2000, "CRKD LP Black Tribal Edition (Xbox) ", 0, XTYPE_XBOX360 },
136138
{ 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 },
137139
{ 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 },
138140
{ 0x03f0, 0x038D, "HyperX Clutch", 0, XTYPE_XBOX360 }, /* wired */
@@ -420,6 +422,7 @@ static const struct xpad_device {
420422
{ 0x3285, 0x0663, "Nacon Evol-X", 0, XTYPE_XBOXONE },
421423
{ 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 },
422424
{ 0x3537, 0x1010, "GameSir G7 SE", 0, XTYPE_XBOXONE },
425+
{ 0x3651, 0x1000, "CRKD SG", 0, XTYPE_XBOX360 },
423426
{ 0x366c, 0x0005, "ByoWave Proteus Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE, FLAG_DELAY_INIT },
424427
{ 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX },
425428
{ 0x37d7, 0x2501, "Flydigi Apex 5", 0, XTYPE_XBOX360 },
@@ -518,6 +521,7 @@ static const struct usb_device_id xpad_table[] = {
518521
*/
519522
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* Xbox USB-IF not-approved class */
520523
XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 controller */
524+
XPAD_XBOX360_VENDOR(0x0351), /* CRKD Controllers */
521525
XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */
522526
XPAD_XBOX360_VENDOR(0x03f0), /* HP HyperX Xbox 360 controllers */
523527
XPAD_XBOXONE_VENDOR(0x03f0), /* HP HyperX Xbox One controllers */
@@ -578,6 +582,7 @@ static const struct usb_device_id xpad_table[] = {
578582
XPAD_XBOXONE_VENDOR(0x3285), /* Nacon Evol-X */
579583
XPAD_XBOX360_VENDOR(0x3537), /* GameSir Controllers */
580584
XPAD_XBOXONE_VENDOR(0x3537), /* GameSir Controllers */
585+
XPAD_XBOX360_VENDOR(0x3651), /* CRKD Controllers */
581586
XPAD_XBOXONE_VENDOR(0x366c), /* ByoWave controllers */
582587
XPAD_XBOX360_VENDOR(0x37d7), /* Flydigi Controllers */
583588
XPAD_XBOX360_VENDOR(0x413d), /* Black Shark Green Ghost Controller */

drivers/input/keyboard/atkbd.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,6 +1937,13 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {
19371937
},
19381938
.callback = atkbd_deactivate_fixup,
19391939
},
1940+
{
1941+
.matches = {
1942+
DMI_MATCH(DMI_SYS_VENDOR, "HONOR"),
1943+
DMI_MATCH(DMI_PRODUCT_NAME, "FMB-P"),
1944+
},
1945+
.callback = atkbd_deactivate_fixup,
1946+
},
19401947
{ }
19411948
};
19421949

drivers/input/keyboard/lkkbd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ static int lkkbd_connect(struct serio *serio, struct serio_driver *drv)
670670

671671
return 0;
672672

673-
fail3: serio_close(serio);
673+
fail3: disable_work_sync(&lk->tq);
674+
serio_close(serio);
674675
fail2: serio_set_drvdata(serio, NULL);
675676
fail1: input_free_device(input_dev);
676677
kfree(lk);
@@ -684,6 +685,8 @@ static void lkkbd_disconnect(struct serio *serio)
684685
{
685686
struct lkkbd *lk = serio_get_drvdata(serio);
686687

688+
disable_work_sync(&lk->tq);
689+
687690
input_get_device(lk->dev);
688691
input_unregister_device(lk->dev);
689692
serio_close(serio);

drivers/input/mouse/alps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,6 +2975,7 @@ static void alps_disconnect(struct psmouse *psmouse)
29752975

29762976
psmouse_reset(psmouse);
29772977
timer_shutdown_sync(&priv->timer);
2978+
disable_delayed_work_sync(&priv->dev3_register_work);
29782979
if (priv->dev2)
29792980
input_unregister_device(priv->dev2);
29802981
if (!IS_ERR_OR_NULL(priv->dev3))

drivers/input/serio/i8042-acpipnpio.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,13 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
11691169
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
11701170
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
11711171
},
1172+
{
1173+
.matches = {
1174+
DMI_MATCH(DMI_BOARD_NAME, "X5KK45xS_X5SP45xS"),
1175+
},
1176+
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1177+
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1178+
},
11721179
/*
11731180
* A lot of modern Clevo barebones have touchpad and/or keyboard issues
11741181
* after suspend fixable with the forcenorestore quirk.

drivers/input/touchscreen/apple_z2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define APPLE_Z2_TOUCH_STARTED 3
2222
#define APPLE_Z2_TOUCH_MOVED 4
2323
#define APPLE_Z2_CMD_READ_INTERRUPT_DATA 0xEB
24+
#define APPLE_Z2_REPLY_INTERRUPT_DATA 0xE1
2425
#define APPLE_Z2_HBPP_CMD_BLOB 0x3001
2526
#define APPLE_Z2_FW_MAGIC 0x5746325A
2627
#define LOAD_COMMAND_INIT_PAYLOAD 0
@@ -142,6 +143,9 @@ static int apple_z2_read_packet(struct apple_z2 *z2)
142143
if (error)
143144
return error;
144145

146+
if (z2->rx_buf[0] != APPLE_Z2_REPLY_INTERRUPT_DATA)
147+
return 0;
148+
145149
pkt_len = (get_unaligned_le16(z2->rx_buf + 1) + 8) & 0xfffffffc;
146150

147151
error = spi_read(z2->spidev, z2->rx_buf, pkt_len);

drivers/input/touchscreen/ti_am335x_tsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int titsc_config_wires(struct titsc *ts_dev)
8585
wire_order[i] = ts_dev->config_inp[i] & 0x0F;
8686
if (WARN_ON(analog_line[i] > 7))
8787
return -EINVAL;
88-
if (WARN_ON(wire_order[i] > ARRAY_SIZE(config_pins)))
88+
if (WARN_ON(wire_order[i] >= ARRAY_SIZE(config_pins)))
8989
return -EINVAL;
9090
}
9191

include/uapi/linux/input-event-codes.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,7 @@
891891

892892
#define ABS_VOLUME 0x20
893893
#define ABS_PROFILE 0x21
894+
#define ABS_SND_PROFILE 0x22
894895

895896
#define ABS_MISC 0x28
896897

@@ -1000,4 +1001,12 @@
10001001
#define SND_MAX 0x07
10011002
#define SND_CNT (SND_MAX+1)
10021003

1004+
/*
1005+
* ABS_SND_PROFILE values
1006+
*/
1007+
1008+
#define SND_PROFILE_SILENT 0x00
1009+
#define SND_PROFILE_VIBRATE 0x01
1010+
#define SND_PROFILE_RING 0x02
1011+
10031012
#endif

0 commit comments

Comments
 (0)