Commit f9e48255 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'input-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a fix for Zinitix driver to not fail probing if the property enabling
   touch keys functionality is not defined. Support for touch keys was
   added in 6.12 merge window so this issue does not affect users of
   released kernels

 - a couple new vendor/device IDs in xpad driver to enable support for
   more hardware

* tag 'input-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: zinitix - don't fail if linux,keycodes prop is absent
  Input: xpad - add support for MSI Claw A1M
  Input: xpad - add support for 8BitDo Ultimate 2C Wireless Controller
parents 9197b73f 2de01e0e
...@@ -218,6 +218,7 @@ static const struct xpad_device { ...@@ -218,6 +218,7 @@ static const struct xpad_device {
{ 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX }, { 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
{ 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX }, { 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX },
{ 0x0d2f, 0x0002, "Andamiro Pump It Up pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x0d2f, 0x0002, "Andamiro Pump It Up pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
{ 0x0db0, 0x1901, "Micro Star International Xbox360 Controller for Windows", 0, XTYPE_XBOX360 },
{ 0x0e4c, 0x1097, "Radica Gamester Controller", 0, XTYPE_XBOX }, { 0x0e4c, 0x1097, "Radica Gamester Controller", 0, XTYPE_XBOX },
{ 0x0e4c, 0x1103, "Radica Gamester Reflex", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX }, { 0x0e4c, 0x1103, "Radica Gamester Reflex", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX },
{ 0x0e4c, 0x2390, "Radica Games Jtech Controller", 0, XTYPE_XBOX }, { 0x0e4c, 0x2390, "Radica Games Jtech Controller", 0, XTYPE_XBOX },
...@@ -373,6 +374,7 @@ static const struct xpad_device { ...@@ -373,6 +374,7 @@ static const struct xpad_device {
{ 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE }, { 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE },
{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE }, { 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
{ 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 }, { 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
{ 0x2dc8, 0x310a, "8BitDo Ultimate 2C Wireless Controller", 0, XTYPE_XBOX360 },
{ 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE }, { 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE },
{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
{ 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 },
...@@ -492,6 +494,7 @@ static const struct usb_device_id xpad_table[] = { ...@@ -492,6 +494,7 @@ static const struct usb_device_id xpad_table[] = {
XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz Gamepad */ XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz Gamepad */
XPAD_XBOXONE_VENDOR(0x0b05), /* ASUS controllers */ XPAD_XBOXONE_VENDOR(0x0b05), /* ASUS controllers */
XPAD_XBOX360_VENDOR(0x0c12), /* Zeroplus X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x0c12), /* Zeroplus X-Box 360 controllers */
XPAD_XBOX360_VENDOR(0x0db0), /* Micro Star International X-Box 360 controllers */
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f Xbox 360 controllers */ XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f Xbox 360 controllers */
XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f Xbox One controllers */ XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f Xbox One controllers */
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori controllers */ XPAD_XBOX360_VENDOR(0x0f0d), /* Hori controllers */
......
...@@ -645,19 +645,29 @@ static int zinitix_ts_probe(struct i2c_client *client) ...@@ -645,19 +645,29 @@ static int zinitix_ts_probe(struct i2c_client *client)
return error; return error;
} }
bt541->num_keycodes = device_property_count_u32(&client->dev, "linux,keycodes"); if (device_property_present(&client->dev, "linux,keycodes")) {
if (bt541->num_keycodes > ARRAY_SIZE(bt541->keycodes)) { bt541->num_keycodes = device_property_count_u32(&client->dev,
dev_err(&client->dev, "too many keys defined (%d)\n", bt541->num_keycodes); "linux,keycodes");
return -EINVAL; if (bt541->num_keycodes < 0) {
} dev_err(&client->dev, "Failed to count keys (%d)\n",
bt541->num_keycodes);
return bt541->num_keycodes;
} else if (bt541->num_keycodes > ARRAY_SIZE(bt541->keycodes)) {
dev_err(&client->dev, "Too many keys defined (%d)\n",
bt541->num_keycodes);
return -EINVAL;
}
error = device_property_read_u32_array(&client->dev, "linux,keycodes", error = device_property_read_u32_array(&client->dev,
bt541->keycodes, "linux,keycodes",
bt541->num_keycodes); bt541->keycodes,
if (error) { bt541->num_keycodes);
dev_err(&client->dev, if (error) {
"Unable to parse \"linux,keycodes\" property: %d\n", error); dev_err(&client->dev,
return error; "Unable to parse \"linux,keycodes\" property: %d\n",
error);
return error;
}
} }
error = zinitix_init_input_dev(bt541); error = zinitix_init_input_dev(bt541);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment