mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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
This commit is contained in:
commit
18751e2eb5
@ -595,6 +595,10 @@ S: Odd Fixes
|
||||
L: linux-alpha@vger.kernel.org
|
||||
F: arch/alpha/
|
||||
|
||||
ALPS PS/2 TOUCHPAD DRIVER
|
||||
R: Pali Rohár <pali.rohar@gmail.com>
|
||||
F: drivers/input/mouse/alps.*
|
||||
|
||||
ALTERA MAILBOX DRIVER
|
||||
M: Ley Foon Tan <lftan@altera.com>
|
||||
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
||||
|
@ -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;
|
||||
|
@ -1568,13 +1568,7 @@ static int elantech_set_properties(struct elantech_data *etd)
|
||||
case 5:
|
||||
etd->hw_version = 3;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 13:
|
||||
case 14:
|
||||
case 6 ... 14:
|
||||
etd->hw_version = 4;
|
||||
break;
|
||||
default:
|
||||
|
@ -355,18 +355,11 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) {
|
||||
psmouse_dbg(psmouse, "VMMouse port in use.\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Check if the device is present */
|
||||
response = ~VMMOUSE_PROTO_MAGIC;
|
||||
VMMOUSE_CMD(GETVERSION, 0, version, response, dummy1, dummy2);
|
||||
if (response != VMMOUSE_PROTO_MAGIC || version == 0xffffffffU) {
|
||||
release_region(VMMOUSE_PROTO_PORT, 4);
|
||||
if (response != VMMOUSE_PROTO_MAGIC || version == 0xffffffffU)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (set_properties) {
|
||||
psmouse->vendor = VMMOUSE_VENDOR;
|
||||
@ -374,8 +367,6 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
|
||||
psmouse->model = version;
|
||||
}
|
||||
|
||||
release_region(VMMOUSE_PROTO_PORT, 4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -394,7 +385,6 @@ static void vmmouse_disconnect(struct psmouse *psmouse)
|
||||
psmouse_reset(psmouse);
|
||||
input_unregister_device(priv->abs_dev);
|
||||
kfree(priv);
|
||||
release_region(VMMOUSE_PROTO_PORT, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -438,15 +428,10 @@ int vmmouse_init(struct psmouse *psmouse)
|
||||
struct input_dev *rel_dev = psmouse->dev, *abs_dev;
|
||||
int error;
|
||||
|
||||
if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) {
|
||||
psmouse_dbg(psmouse, "VMMouse port in use.\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
psmouse_reset(psmouse);
|
||||
error = vmmouse_enable(psmouse);
|
||||
if (error)
|
||||
goto release_region;
|
||||
return error;
|
||||
|
||||
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
|
||||
abs_dev = input_allocate_device();
|
||||
@ -502,8 +487,5 @@ init_fail:
|
||||
kfree(priv);
|
||||
psmouse->private = NULL;
|
||||
|
||||
release_region:
|
||||
release_region(VMMOUSE_PROTO_PORT, 4);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ MODULE_AUTHOR("Jaya Kumar <jayakumar.lkml@gmail.com>");
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
#define W8001_MAX_LENGTH 11
|
||||
#define W8001_MAX_LENGTH 13
|
||||
#define W8001_LEAD_MASK 0x80
|
||||
#define W8001_LEAD_BYTE 0x80
|
||||
#define W8001_TAB_MASK 0x40
|
||||
@ -339,6 +339,15 @@ static irqreturn_t w8001_interrupt(struct serio *serio,
|
||||
w8001->idx = 0;
|
||||
parse_multi_touch(w8001);
|
||||
break;
|
||||
|
||||
default:
|
||||
/*
|
||||
* ThinkPad X60 Tablet PC (pen only device) sometimes
|
||||
* sends invalid data packets that are larger than
|
||||
* W8001_PKTLEN_TPCPEN. Let's start over again.
|
||||
*/
|
||||
if (!w8001->touch_dev && w8001->idx > W8001_PKTLEN_TPCPEN - 1)
|
||||
w8001->idx = 0;
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
@ -611,6 +611,37 @@
|
||||
#define KEY_KBDINPUTASSIST_ACCEPT 0x264
|
||||
#define KEY_KBDINPUTASSIST_CANCEL 0x265
|
||||
|
||||
/* Diagonal movement keys */
|
||||
#define KEY_RIGHT_UP 0x266
|
||||
#define KEY_RIGHT_DOWN 0x267
|
||||
#define KEY_LEFT_UP 0x268
|
||||
#define KEY_LEFT_DOWN 0x269
|
||||
|
||||
#define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */
|
||||
/* Show Top Menu of the Media (e.g. DVD) */
|
||||
#define KEY_MEDIA_TOP_MENU 0x26b
|
||||
#define KEY_NUMERIC_11 0x26c
|
||||
#define KEY_NUMERIC_12 0x26d
|
||||
/*
|
||||
* Toggle Audio Description: refers to an audio service that helps blind and
|
||||
* visually impaired consumers understand the action in a program. Note: in
|
||||
* some countries this is referred to as "Video Description".
|
||||
*/
|
||||
#define KEY_AUDIO_DESC 0x26e
|
||||
#define KEY_3D_MODE 0x26f
|
||||
#define KEY_NEXT_FAVORITE 0x270
|
||||
#define KEY_STOP_RECORD 0x271
|
||||
#define KEY_PAUSE_RECORD 0x272
|
||||
#define KEY_VOD 0x273 /* Video on Demand */
|
||||
#define KEY_UNMUTE 0x274
|
||||
#define KEY_FASTREVERSE 0x275
|
||||
#define KEY_SLOWREVERSE 0x276
|
||||
/*
|
||||
* Control a data application associated with the currently viewed channel,
|
||||
* e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.)
|
||||
*/
|
||||
#define KEY_DATA 0x275
|
||||
|
||||
#define BTN_TRIGGER_HAPPY 0x2c0
|
||||
#define BTN_TRIGGER_HAPPY1 0x2c0
|
||||
#define BTN_TRIGGER_HAPPY2 0x2c1
|
||||
|
@ -247,6 +247,7 @@ struct input_mask {
|
||||
#define BUS_ATARI 0x1B
|
||||
#define BUS_SPI 0x1C
|
||||
#define BUS_RMI 0x1D
|
||||
#define BUS_CEC 0x1E
|
||||
|
||||
/*
|
||||
* MT_TOOL types
|
||||
|
Loading…
Reference in New Issue
Block a user