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
Šī revīzija ir iekļauta:
@@ -1031,17 +1031,17 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect
|
||||
|
||||
case XTYPE_XBOXONE:
|
||||
packet->data[0] = 0x09; /* activate rumble */
|
||||
packet->data[1] = 0x08;
|
||||
packet->data[1] = 0x00;
|
||||
packet->data[2] = xpad->odata_serial++;
|
||||
packet->data[3] = 0x08; /* continuous effect */
|
||||
packet->data[4] = 0x00; /* simple rumble mode */
|
||||
packet->data[5] = 0x03; /* L and R actuator only */
|
||||
packet->data[6] = 0x00; /* TODO: LT actuator */
|
||||
packet->data[7] = 0x00; /* TODO: RT actuator */
|
||||
packet->data[3] = 0x09;
|
||||
packet->data[4] = 0x00;
|
||||
packet->data[5] = 0x0F;
|
||||
packet->data[6] = 0x00;
|
||||
packet->data[7] = 0x00;
|
||||
packet->data[8] = strong / 512; /* left actuator */
|
||||
packet->data[9] = weak / 512; /* right actuator */
|
||||
packet->data[10] = 0x80; /* length of pulse */
|
||||
packet->data[11] = 0x00; /* stop period of pulse */
|
||||
packet->data[10] = 0xFF;
|
||||
packet->data[11] = 0x00;
|
||||
packet->data[12] = 0x00;
|
||||
packet->len = 13;
|
||||
packet->pending = true;
|
||||
@@ -1437,16 +1437,6 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
|
||||
break;
|
||||
}
|
||||
|
||||
if (xpad_device[i].xtype == XTYPE_XBOXONE &&
|
||||
intf->cur_altsetting->desc.bInterfaceNumber != 0) {
|
||||
/*
|
||||
* The Xbox One controller lists three interfaces all with the
|
||||
* same interface class, subclass and protocol. Differentiate by
|
||||
* interface number.
|
||||
*/
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL);
|
||||
if (!xpad)
|
||||
return -ENOMEM;
|
||||
@@ -1478,6 +1468,8 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
|
||||
if (intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC) {
|
||||
if (intf->cur_altsetting->desc.bInterfaceProtocol == 129)
|
||||
xpad->xtype = XTYPE_XBOX360W;
|
||||
else if (intf->cur_altsetting->desc.bInterfaceProtocol == 208)
|
||||
xpad->xtype = XTYPE_XBOXONE;
|
||||
else
|
||||
xpad->xtype = XTYPE_XBOX360;
|
||||
} else {
|
||||
@@ -1492,6 +1484,17 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
|
||||
xpad->mapping |= MAP_STICKS_TO_NULL;
|
||||
}
|
||||
|
||||
if (xpad->xtype == XTYPE_XBOXONE &&
|
||||
intf->cur_altsetting->desc.bInterfaceNumber != 0) {
|
||||
/*
|
||||
* The Xbox One controller lists three interfaces all with the
|
||||
* same interface class, subclass and protocol. Differentiate by
|
||||
* interface number.
|
||||
*/
|
||||
error = -ENODEV;
|
||||
goto err_free_in_urb;
|
||||
}
|
||||
|
||||
error = xpad_init_output(intf, xpad);
|
||||
if (error)
|
||||
goto err_free_in_urb;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user