diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-27 23:34:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-27 23:34:43 -0400 |
| commit | 18751e2eb51261059e51e1a7cf5aec2fd5429608 (patch) | |
| tree | 6b41c4d5826e004932935cbe1917251fc1b130de | |
| parent | 3992a272a72c7a258236cf035f74396ec4f89941 (diff) | |
| parent | 60842ef8128e7bf58c024814cd0dc14319232b6c (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: vmmouse - remove port reservation
Input: elantech - add more IC body types to the list
Input: wacom_w8001 - ignore invalid pen data packets
Input: wacom_w8001 - w8001_MAX_LENGTH should be 13
Input: xpad - fix oops when attaching an unknown Xbox One gamepad
MAINTAINERS: add Pali Rohár as reviewer of ALPS PS/2 touchpad driver
Input: add HDMI CEC specific keycodes
Input: add BUS_CEC type
Input: xpad - fix rumble on Xbox One controllers with 2015 firmware
| -rw-r--r-- | MAINTAINERS | 4 | ||||
| -rw-r--r-- | drivers/input/joystick/xpad.c | 39 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 8 | ||||
| -rw-r--r-- | drivers/input/mouse/vmmouse.c | 22 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wacom_w8001.c | 11 | ||||
| -rw-r--r-- | include/uapi/linux/input-event-codes.h | 31 | ||||
| -rw-r--r-- | include/uapi/linux/input.h | 1 |
7 files changed, 70 insertions, 46 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 952fd2aba7b7..0f148d3bdae7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -595,6 +595,10 @@ S: Odd Fixes | |||
| 595 | L: linux-alpha@vger.kernel.org | 595 | L: linux-alpha@vger.kernel.org |
| 596 | F: arch/alpha/ | 596 | F: arch/alpha/ |
| 597 | 597 | ||
| 598 | ALPS PS/2 TOUCHPAD DRIVER | ||
| 599 | R: Pali Rohár <pali.rohar@gmail.com> | ||
| 600 | F: drivers/input/mouse/alps.* | ||
| 601 | |||
| 598 | ALTERA MAILBOX DRIVER | 602 | ALTERA MAILBOX DRIVER |
| 599 | M: Ley Foon Tan <lftan@altera.com> | 603 | M: Ley Foon Tan <lftan@altera.com> |
| 600 | L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers) | 604 | L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers) |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 804dbcc37d3f..3438e98c145a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
| @@ -1031,17 +1031,17 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect | |||
| 1031 | 1031 | ||
| 1032 | case XTYPE_XBOXONE: | 1032 | case XTYPE_XBOXONE: |
| 1033 | packet->data[0] = 0x09; /* activate rumble */ | 1033 | packet->data[0] = 0x09; /* activate rumble */ |
| 1034 | packet->data[1] = 0x08; | 1034 | packet->data[1] = 0x00; |
| 1035 | packet->data[2] = xpad->odata_serial++; | 1035 | packet->data[2] = xpad->odata_serial++; |
| 1036 | packet->data[3] = 0x08; /* continuous effect */ | 1036 | packet->data[3] = 0x09; |
| 1037 | packet->data[4] = 0x00; /* simple rumble mode */ | 1037 | packet->data[4] = 0x00; |
| 1038 | packet->data[5] = 0x03; /* L and R actuator only */ | 1038 | packet->data[5] = 0x0F; |
| 1039 | packet->data[6] = 0x00; /* TODO: LT actuator */ | 1039 | packet->data[6] = 0x00; |
| 1040 | packet->data[7] = 0x00; /* TODO: RT actuator */ | 1040 | packet->data[7] = 0x00; |
| 1041 | packet->data[8] = strong / 512; /* left actuator */ | 1041 | packet->data[8] = strong / 512; /* left actuator */ |
| 1042 | packet->data[9] = weak / 512; /* right actuator */ | 1042 | packet->data[9] = weak / 512; /* right actuator */ |
| 1043 | packet->data[10] = 0x80; /* length of pulse */ | 1043 | packet->data[10] = 0xFF; |
| 1044 | packet->data[11] = 0x00; /* stop period of pulse */ | 1044 | packet->data[11] = 0x00; |
| 1045 | packet->data[12] = 0x00; | 1045 | packet->data[12] = 0x00; |
| 1046 | packet->len = 13; | 1046 | packet->len = 13; |
| 1047 | packet->pending = true; | 1047 | packet->pending = true; |
| @@ -1437,16 +1437,6 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
| 1437 | break; | 1437 | break; |
| 1438 | } | 1438 | } |
| 1439 | 1439 | ||
| 1440 | if (xpad_device[i].xtype == XTYPE_XBOXONE && | ||
| 1441 | intf->cur_altsetting->desc.bInterfaceNumber != 0) { | ||
| 1442 | /* | ||
| 1443 | * The Xbox One controller lists three interfaces all with the | ||
| 1444 | * same interface class, subclass and protocol. Differentiate by | ||
| 1445 | * interface number. | ||
| 1446 | */ | ||
| 1447 | return -ENODEV; | ||
| 1448 | } | ||
| 1449 | |||
| 1450 | xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL); | 1440 | xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL); |
| 1451 | if (!xpad) | 1441 | if (!xpad) |
| 1452 | return -ENOMEM; | 1442 | return -ENOMEM; |
| @@ -1478,6 +1468,8 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
| 1478 | if (intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC) { | 1468 | if (intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC) { |
| 1479 | if (intf->cur_altsetting->desc.bInterfaceProtocol == 129) | 1469 | if (intf->cur_altsetting->desc.bInterfaceProtocol == 129) |
| 1480 | xpad->xtype = XTYPE_XBOX360W; | 1470 | xpad->xtype = XTYPE_XBOX360W; |
| 1471 | else if (intf->cur_altsetting->desc.bInterfaceProtocol == 208) | ||
| 1472 | xpad->xtype = XTYPE_XBOXONE; | ||
| 1481 | else | 1473 | else |
| 1482 | xpad->xtype = XTYPE_XBOX360; | 1474 | xpad->xtype = XTYPE_XBOX360; |
| 1483 | } else { | 1475 | } else { |
| @@ -1492,6 +1484,17 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
| 1492 | xpad->mapping |= MAP_STICKS_TO_NULL; | 1484 | xpad->mapping |= MAP_STICKS_TO_NULL; |
| 1493 | } | 1485 | } |
| 1494 | 1486 | ||
| 1487 | if (xpad->xtype == XTYPE_XBOXONE && | ||
| 1488 | intf->cur_altsetting->desc.bInterfaceNumber != 0) { | ||
| 1489 | /* | ||
| 1490 | * The Xbox One controller lists three interfaces all with the | ||
| 1491 | * same interface class, subclass and protocol. Differentiate by | ||
| 1492 | * interface number. | ||
| 1493 | */ | ||
| 1494 | error = -ENODEV; | ||
| 1495 | goto err_free_in_urb; | ||
| 1496 | } | ||
| 1497 | |||
| 1495 | error = xpad_init_output(intf, xpad); | 1498 | error = xpad_init_output(intf, xpad); |
| 1496 | if (error) | 1499 | if (error) |
| 1497 | goto err_free_in_urb; | 1500 | goto err_free_in_urb; |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 78f93cf68840..be5b399da5d3 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -1568,13 +1568,7 @@ static int elantech_set_properties(struct elantech_data *etd) | |||
| 1568 | case 5: | 1568 | case 5: |
| 1569 | etd->hw_version = 3; | 1569 | etd->hw_version = 3; |
| 1570 | break; | 1570 | break; |
| 1571 | case 6: | 1571 | case 6 ... 14: |
| 1572 | case 7: | ||
| 1573 | case 8: | ||
| 1574 | case 9: | ||
| 1575 | case 10: | ||
| 1576 | case 13: | ||
| 1577 | case 14: | ||
| 1578 | etd->hw_version = 4; | 1572 | etd->hw_version = 4; |
| 1579 | break; | 1573 | break; |
| 1580 | default: | 1574 | default: |
diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c index a3f0f5a47490..0f586780ceb4 100644 --- a/drivers/input/mouse/vmmouse.c +++ b/drivers/input/mouse/vmmouse.c | |||
| @@ -355,18 +355,11 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties) | |||
| 355 | return -ENXIO; | 355 | return -ENXIO; |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) { | ||
| 359 | psmouse_dbg(psmouse, "VMMouse port in use.\n"); | ||
| 360 | return -EBUSY; | ||
| 361 | } | ||
| 362 | |||
| 363 | /* Check if the device is present */ | 358 | /* Check if the device is present */ |
| 364 | response = ~VMMOUSE_PROTO_MAGIC; | 359 | response = ~VMMOUSE_PROTO_MAGIC; |
| 365 | VMMOUSE_CMD(GETVERSION, 0, version, response, dummy1, dummy2); | 360 | VMMOUSE_CMD(GETVERSION, 0, version, response, dummy1, dummy2); |
| 366 | if (response != VMMOUSE_PROTO_MAGIC || version == 0xffffffffU) { | 361 | if (response != VMMOUSE_PROTO_MAGIC || version == 0xffffffffU) |
| 367 | release_region(VMMOUSE_PROTO_PORT, 4); | ||
| 368 | return -ENXIO; | 362 | return -ENXIO; |
| 369 | } | ||
| 370 | 363 | ||
| 371 | if (set_properties) { | 364 | if (set_properties) { |
| 372 | psmouse->vendor = VMMOUSE_VENDOR; | 365 | psmouse->vendor = VMMOUSE_VENDOR; |
| @@ -374,8 +367,6 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties) | |||
| 374 | psmouse->model = version; | 367 | psmouse->model = version; |
| 375 | } | 368 | } |
| 376 | 369 | ||
| 377 | release_region(VMMOUSE_PROTO_PORT, 4); | ||
| 378 | |||
| 379 | return 0; | 370 | return 0; |
| 380 | } | 371 | } |
| 381 | 372 | ||
| @@ -394,7 +385,6 @@ static void vmmouse_disconnect(struct psmouse *psmouse) | |||
| 394 | psmouse_reset(psmouse); | 385 | psmouse_reset(psmouse); |
| 395 | input_unregister_device(priv->abs_dev); | 386 | input_unregister_device(priv->abs_dev); |
| 396 | kfree(priv); | 387 | kfree(priv); |
| 397 | release_region(VMMOUSE_PROTO_PORT, 4); | ||
| 398 | } | 388 | } |
| 399 | 389 | ||
| 400 | /** | 390 | /** |
| @@ -438,15 +428,10 @@ int vmmouse_init(struct psmouse *psmouse) | |||
| 438 | struct input_dev *rel_dev = psmouse->dev, *abs_dev; | 428 | struct input_dev *rel_dev = psmouse->dev, *abs_dev; |
| 439 | int error; | 429 | int error; |
| 440 | 430 | ||
| 441 | if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) { | ||
| 442 | psmouse_dbg(psmouse, "VMMouse port in use.\n"); | ||
| 443 | return -EBUSY; | ||
| 444 | } | ||
| 445 | |||
| 446 | psmouse_reset(psmouse); | 431 | psmouse_reset(psmouse); |
| 447 | error = vmmouse_enable(psmouse); | 432 | error = vmmouse_enable(psmouse); |
| 448 | if (error) | 433 | if (error) |
| 449 | goto release_region; | 434 | return error; |
| 450 | 435 | ||
| 451 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 436 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
| 452 | abs_dev = input_allocate_device(); | 437 | abs_dev = input_allocate_device(); |
| @@ -502,8 +487,5 @@ init_fail: | |||
| 502 | kfree(priv); | 487 | kfree(priv); |
| 503 | psmouse->private = NULL; | 488 | psmouse->private = NULL; |
| 504 | |||
