Skip to content

Commit 0210bb6

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov: "The main change is to fix breakage in Elantech driver introduced by the recent commit adding trackpoint reporting to protocol v4. Now we are trusting the hardware to advertise the trackpoint properly and do not try to decode the data as trackpoint if firmware told us it is not present" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - use proper endpoint type Input: elantech - trust firmware about trackpoint presence Input: synaptics - adjust min/max on Thinkpad E540
2 parents 3314bf6 + a1f9a40 commit 0210bb6

3 files changed

Lines changed: 18 additions & 12 deletions

File tree

‎drivers/input/joystick/xpad.c‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,19 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
11791179
}
11801180

11811181
ep_irq_in = &intf->cur_altsetting->endpoint[1].desc;
1182-
usb_fill_bulk_urb(xpad->bulk_out, udev,
1183-
usb_sndbulkpipe(udev, ep_irq_in->bEndpointAddress),
1184-
xpad->bdata, XPAD_PKT_LEN, xpad_bulk_out, xpad);
1182+
if (usb_endpoint_is_bulk_out(ep_irq_in)) {
1183+
usb_fill_bulk_urb(xpad->bulk_out, udev,
1184+
usb_sndbulkpipe(udev,
1185+
ep_irq_in->bEndpointAddress),
1186+
xpad->bdata, XPAD_PKT_LEN,
1187+
xpad_bulk_out, xpad);
1188+
} else {
1189+
usb_fill_int_urb(xpad->bulk_out, udev,
1190+
usb_sndintpipe(udev,
1191+
ep_irq_in->bEndpointAddress),
1192+
xpad->bdata, XPAD_PKT_LEN,
1193+
xpad_bulk_out, xpad, 0);
1194+
}
11851195

11861196
/*
11871197
* Submit the int URB immediately rather than waiting for open

‎drivers/input/mouse/elantech.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,6 @@ static void elantech_report_trackpoint(struct psmouse *psmouse,
428428
int x, y;
429429
u32 t;
430430

431-
if (dev_WARN_ONCE(&psmouse->ps2dev.serio->dev,
432-
!tp_dev,
433-
psmouse_fmt("Unexpected trackpoint message\n"))) {
434-
if (etd->debug == 1)
435-
elantech_packet_dump(psmouse);
436-
return;
437-
}
438-
439431
t = get_unaligned_le32(&packet[0]);
440432

441433
switch (t & ~7U) {
@@ -793,7 +785,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
793785
unsigned char packet_type = packet[3] & 0x03;
794786
bool sanity_check;
795787

796-
if ((packet[3] & 0x0f) == 0x06)
788+
if (etd->tp_dev && (packet[3] & 0x0f) == 0x06)
797789
return PACKET_TRACKPOINT;
798790

799791
/*

‎drivers/input/mouse/synaptics.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
143143
(const char * const []){"LEN2001", NULL},
144144
1024, 5022, 2508, 4832
145145
},
146+
{
147+
(const char * const []){"LEN2006", NULL},
148+
1264, 5675, 1171, 4688
149+
},
146150
{ }
147151
};
148152

0 commit comments

Comments
 (0)