Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:
"The main change is that we now publish "firmware ID" for the serio
devices to help userspace figure out the kind of touchpads it is
dealing with: i8042 will export PS/2 port's PNP IDs as firmware IDs.

You will also get more quirks for Synaptics touchpads in various
Lenovo laptops, a change to elantech driver to recognize even more
models, and fixups to wacom and couple other drivers"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elantech - add support for newer elantech touchpads
Input: soc_button_array - fix a crash during rmmod
Input: synaptics - add min/max quirk for ThinkPad T431s, L440, L540, S1 Yoga and X1
Input: synaptics - report INPUT_PROP_TOPBUTTONPAD property
Input: Add INPUT_PROP_TOPBUTTONPAD device property
Input: i8042 - add firmware_id support
Input: serio - add firmware_id sysfs attribute
Input: wacom - handle 1024 pressure levels in wacom_tpc_pen
Input: wacom - references to 'wacom->data' should use 'unsigned char*'
Input: wacom - override 'pressure_max' with value from HID_USAGE_PRESSURE
Input: wacom - use full 32-bit HID Usage value in switch statement
Input: wacom - missed the last bit of expresskey for DTU-1031
Input: ads7846 - fix device usage within attribute show
Input: da9055_onkey - remove use of regmap_irq_get_virq()

+257 -145
-1
drivers/input/misc/da9055_onkey.c
··· 109 109 110 110 INIT_DELAYED_WORK(&onkey->work, da9055_onkey_work); 111 111 112 - irq = regmap_irq_get_virq(da9055->irq_data, irq); 113 112 err = request_threaded_irq(irq, NULL, da9055_onkey_irq, 114 113 IRQF_TRIGGER_HIGH | IRQF_ONESHOT, 115 114 "ONKEY", onkey);
+1
drivers/input/misc/soc_button_array.c
··· 169 169 soc_button_remove(pdev); 170 170 return error; 171 171 } 172 + continue; 172 173 } 173 174 174 175 priv->children[i] = pd;
+1
drivers/input/mouse/elantech.c
··· 1353 1353 case 6: 1354 1354 case 7: 1355 1355 case 8: 1356 + case 9: 1356 1357 etd->hw_version = 4; 1357 1358 break; 1358 1359 default:
+95 -2
drivers/input/mouse/synaptics.c
··· 117 117 } 118 118 119 119 #ifdef CONFIG_MOUSE_PS2_SYNAPTICS 120 + /* This list has been kindly provided by Synaptics. */ 121 + static const char * const topbuttonpad_pnp_ids[] = { 122 + "LEN0017", 123 + "LEN0018", 124 + "LEN0019", 125 + "LEN0023", 126 + "LEN002A", 127 + "LEN002B", 128 + "LEN002C", 129 + "LEN002D", 130 + "LEN002E", 131 + "LEN0033", /* Helix */ 132 + "LEN0034", /* T431s, T540, X1 Carbon 2nd */ 133 + "LEN0035", /* X240 */ 134 + "LEN0036", /* T440 */ 135 + "LEN0037", 136 + "LEN0038", 137 + "LEN0041", 138 + "LEN0042", /* Yoga */ 139 + "LEN0045", 140 + "LEN0046", 141 + "LEN0047", 142 + "LEN0048", 143 + "LEN0049", 144 + "LEN2000", 145 + "LEN2001", 146 + "LEN2002", 147 + "LEN2003", 148 + "LEN2004", /* L440 */ 149 + "LEN2005", 150 + "LEN2006", 151 + "LEN2007", 152 + "LEN2008", 153 + "LEN2009", 154 + "LEN200A", 155 + "LEN200B", 156 + NULL 157 + }; 120 158 121 159 /***************************************************************************** 122 160 * Synaptics communications functions ··· 1293 1255 input_abs_set_res(dev, y_code, priv->y_res); 1294 1256 } 1295 1257 1296 - static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) 1258 + static void set_input_params(struct psmouse *psmouse, 1259 + struct synaptics_data *priv) 1297 1260 { 1261 + struct input_dev *dev = psmouse->dev; 1298 1262 int i; 1299 1263 1300 1264 /* Things that apply to both modes */ ··· 1365 1325 1366 1326 if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { 1367 1327 __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); 1328 + /* See if this buttonpad has a top button area */ 1329 + if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) { 1330 + for (i = 0; topbuttonpad_pnp_ids[i]; i++) { 1331 + if (strstr(psmouse->ps2dev.serio->firmware_id, 1332 + topbuttonpad_pnp_ids[i])) { 1333 + __set_bit(INPUT_PROP_TOPBUTTONPAD, 1334 + dev->propbit); 1335 + break; 1336 + } 1337 + } 1338 + } 1368 1339 /* Clickpads report only left button */ 1369 1340 __clear_bit(BTN_RIGHT, dev->keybit); 1370 1341 __clear_bit(BTN_MIDDLE, dev->keybit); ··· 1566 1515 .driver_data = (int []){1232, 5710, 1156, 4696}, 1567 1516 }, 1568 1517 { 1518 + /* Lenovo ThinkPad T431s */ 1519 + .matches = { 1520 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1521 + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T431"), 1522 + }, 1523 + .driver_data = (int []){1024, 5112, 2024, 4832}, 1524 + }, 1525 + { 1569 1526 /* Lenovo ThinkPad T440s */ 1570 1527 .matches = { 1571 1528 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1572 1529 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T440"), 1530 + }, 1531 + .driver_data = (int []){1024, 5112, 2024, 4832}, 1532 + }, 1533 + { 1534 + /* Lenovo ThinkPad L440 */ 1535 + .matches = { 1536 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1537 + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L440"), 1573 1538 }, 1574 1539 .driver_data = (int []){1024, 5112, 2024, 4832}, 1575 1540 }, ··· 1596 1529 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T540"), 1597 1530 }, 1598 1531 .driver_data = (int []){1024, 5056, 2058, 4832}, 1532 + }, 1533 + { 1534 + /* Lenovo ThinkPad L540 */ 1535 + .matches = { 1536 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1537 + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L540"), 1538 + }, 1539 + .driver_data = (int []){1024, 5112, 2024, 4832}, 1540 + }, 1541 + { 1542 + /* Lenovo Yoga S1 */ 1543 + .matches = { 1544 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1545 + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, 1546 + "ThinkPad S1 Yoga"), 1547 + }, 1548 + .driver_data = (int []){1232, 5710, 1156, 4696}, 1549 + }, 1550 + { 1551 + /* Lenovo ThinkPad X1 Carbon Haswell (3rd generation) */ 1552 + .matches = { 1553 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1554 + DMI_MATCH(DMI_PRODUCT_VERSION, 1555 + "ThinkPad X1 Carbon 2nd"), 1556 + }, 1557 + .driver_data = (int []){1024, 5112, 2024, 4832}, 1599 1558 }, 1600 1559 #endif 1601 1560 { } ··· 1686 1593 priv->capabilities, priv->ext_cap, priv->ext_cap_0c, 1687 1594 priv->board_id, priv->firmware_id); 1688 1595 1689 - set_input_params(psmouse->dev, priv); 1596 + set_input_params(psmouse, priv); 1690 1597 1691 1598 /* 1692 1599 * Encode touchpad model so that it can be used to set
+15
drivers/input/serio/i8042-x86ia64io.h
··· 702 702 static char i8042_pnp_kbd_name[32]; 703 703 static char i8042_pnp_aux_name[32]; 704 704 705 + static void i8042_pnp_id_to_string(struct pnp_id *id, char *dst, int dst_size) 706 + { 707 + strlcpy(dst, "PNP:", dst_size); 708 + 709 + while (id) { 710 + strlcat(dst, " ", dst_size); 711 + strlcat(dst, id->id, dst_size); 712 + id = id->next; 713 + } 714 + } 715 + 705 716 static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *did) 706 717 { 707 718 if (pnp_port_valid(dev, 0) && pnp_port_len(dev, 0) == 1) ··· 729 718 strlcat(i8042_pnp_kbd_name, ":", sizeof(i8042_pnp_kbd_name)); 730 719 strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name)); 731 720 } 721 + i8042_pnp_id_to_string(dev->id, i8042_kbd_firmware_id, 722 + sizeof(i8042_kbd_firmware_id)); 732 723 733 724 /* Keyboard ports are always supposed to be wakeup-enabled */ 734 725 device_set_wakeup_enable(&dev->dev, true); ··· 755 742 strlcat(i8042_pnp_aux_name, ":", sizeof(i8042_pnp_aux_name)); 756 743 strlcat(i8042_pnp_aux_name, pnp_dev_name(dev), sizeof(i8042_pnp_aux_name)); 757 744 } 745 + i8042_pnp_id_to_string(dev->id, i8042_aux_firmware_id, 746 + sizeof(i8042_aux_firmware_id)); 758 747 759 748 i8042_pnp_aux_devices++; 760 749 return 0;
+6
drivers/input/serio/i8042.c
··· 87 87 #endif 88 88 89 89 static bool i8042_bypass_aux_irq_test; 90 + static char i8042_kbd_firmware_id[128]; 91 + static char i8042_aux_firmware_id[128]; 90 92 91 93 #include "i8042.h" 92 94 ··· 1220 1218 serio->dev.parent = &i8042_platform_device->dev; 1221 1219 strlcpy(serio->name, "i8042 KBD port", sizeof(serio->name)); 1222 1220 strlcpy(serio->phys, I8042_KBD_PHYS_DESC, sizeof(serio->phys)); 1221 + strlcpy(serio->firmware_id, i8042_kbd_firmware_id, 1222 + sizeof(serio->firmware_id)); 1223 1223 1224 1224 port->serio = serio; 1225 1225 port->irq = I8042_KBD_IRQ; ··· 1248 1244 if (idx < 0) { 1249 1245 strlcpy(serio->name, "i8042 AUX port", sizeof(serio->name)); 1250 1246 strlcpy(serio->phys, I8042_AUX_PHYS_DESC, sizeof(serio->phys)); 1247 + strlcpy(serio->firmware_id, i8042_aux_firmware_id, 1248 + sizeof(serio->firmware_id)); 1251 1249 serio->close = i8042_port_close; 1252 1250 } else { 1253 1251 snprintf(serio->name, sizeof(serio->name), "i8042 AUX%d port", idx);
+14
drivers/input/serio/serio.c
··· 451 451 return retval; 452 452 } 453 453 454 + static ssize_t firmware_id_show(struct device *dev, struct device_attribute *attr, char *buf) 455 + { 456 + struct serio *serio = to_serio_port(dev); 457 + 458 + return sprintf(buf, "%s\n", serio->firmware_id); 459 + } 460 + 454 461 static DEVICE_ATTR_RO(type); 455 462 static DEVICE_ATTR_RO(proto); 456 463 static DEVICE_ATTR_RO(id); ··· 480 473 static DEVICE_ATTR_WO(drvctl); 481 474 static DEVICE_ATTR(description, S_IRUGO, serio_show_description, NULL); 482 475 static DEVICE_ATTR(bind_mode, S_IWUSR | S_IRUGO, serio_show_bind_mode, serio_set_bind_mode); 476 + static DEVICE_ATTR_RO(firmware_id); 483 477 484 478 static struct attribute *serio_device_attrs[] = { 485 479 &dev_attr_modalias.attr, 486 480 &dev_attr_description.attr, 487 481 &dev_attr_drvctl.attr, 488 482 &dev_attr_bind_mode.attr, 483 + &dev_attr_firmware_id.attr, 489 484 NULL 490 485 }; 491 486 ··· 930 921 SERIO_ADD_UEVENT_VAR("SERIO_PROTO=%02x", serio->id.proto); 931 922 SERIO_ADD_UEVENT_VAR("SERIO_ID=%02x", serio->id.id); 932 923 SERIO_ADD_UEVENT_VAR("SERIO_EXTRA=%02x", serio->id.extra); 924 + 933 925 SERIO_ADD_UEVENT_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X", 934 926 serio->id.type, serio->id.proto, serio->id.id, serio->id.extra); 927 + 928 + if (serio->firmware_id[0]) 929 + SERIO_ADD_UEVENT_VAR("SERIO_FIRMWARE_ID=%s", 930 + serio->firmware_id); 935 931 936 932 return 0; 937 933 }
+112 -122
drivers/input/tablet/wacom_sys.c
··· 22 22 #define HID_USAGE_PAGE_DIGITIZER 0x0d 23 23 #define HID_USAGE_PAGE_DESKTOP 0x01 24 24 #define HID_USAGE 0x09 25 - #define HID_USAGE_X 0x30 26 - #define HID_USAGE_Y 0x31 27 - #define HID_USAGE_X_TILT 0x3d 28 - #define HID_USAGE_Y_TILT 0x3e 29 - #define HID_USAGE_FINGER 0x22 30 - #define HID_USAGE_STYLUS 0x20 31 - #define HID_USAGE_CONTACTMAX 0x55 25 + #define HID_USAGE_X ((HID_USAGE_PAGE_DESKTOP << 16) | 0x30) 26 + #define HID_USAGE_Y ((HID_USAGE_PAGE_DESKTOP << 16) | 0x31) 27 + #define HID_USAGE_PRESSURE ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x30) 28 + #define HID_USAGE_X_TILT ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x3d) 29 + #define HID_USAGE_Y_TILT ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x3e) 30 + #define HID_USAGE_FINGER ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x22) 31 + #define HID_USAGE_STYLUS ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x20) 32 + #define HID_USAGE_CONTACTMAX ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x55) 32 33 #define HID_COLLECTION 0xa1 33 34 #define HID_COLLECTION_LOGICAL 0x02 34 35 #define HID_COLLECTION_END 0xc0 35 - 36 - enum { 37 - WCM_UNDEFINED = 0, 38 - WCM_DESKTOP, 39 - WCM_DIGITIZER, 40 - }; 41 36 42 37 struct hid_descriptor { 43 38 struct usb_descriptor_header header; ··· 300 305 char limit = 0; 301 306 /* result has to be defined as int for some devices */ 302 307 int result = 0, touch_max = 0; 303 - int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0; 308 + int i = 0, page = 0, finger = 0, pen = 0; 304 309 unsigned char *report; 305 310 306 311 report = kzalloc(hid_desc->wDescriptorLength, GFP_KERNEL); ··· 327 332 328 333 switch (report[i]) { 329 334 case HID_USAGE_PAGE: 330 - switch (report[i + 1]) { 331 - case HID_USAGE_PAGE_DIGITIZER: 332 - usage = WCM_DIGITIZER; 333 - i++; 334 - break; 335 - 336 - case HID_USAGE_PAGE_DESKTOP: 337 - usage = WCM_DESKTOP; 338 - i++; 339 - break; 340 - } 335 + page = report[i + 1]; 336 + i++; 341 337 break; 342 338 343 339 case HID_USAGE: 344 - switch (report[i + 1]) { 340 + switch (page << 16 | report[i + 1]) { 345 341 case HID_USAGE_X: 346 - if (usage == WCM_DESKTOP) { 347 - if (finger) { 348 - features->device_type = BTN_TOOL_FINGER; 349 - /* touch device at least supports one touch point */ 350 - touch_max = 1; 351 - switch (features->type) { 352 - case TABLETPC2FG: 353 - features->pktlen = WACOM_PKGLEN_TPC2FG; 354 - break; 342 + if (finger) { 343 + features->device_type = BTN_TOOL_FINGER; 344 + /* touch device at least supports one touch point */ 345 + touch_max = 1; 346 + switch (features->type) { 347 + case TABLETPC2FG: 348 + features->pktlen = WACOM_PKGLEN_TPC2FG; 349 + break; 355 350 356 - case MTSCREEN: 357 - case WACOM_24HDT: 358 - features->pktlen = WACOM_PKGLEN_MTOUCH; 359 - break; 351 + case MTSCREEN: 352 + case WACOM_24HDT: 353 + features->pktlen = WACOM_PKGLEN_MTOUCH; 354 + break; 360 355 361 - case MTTPC: 362 - features->pktlen = WACOM_PKGLEN_MTTPC; 363 - break; 356 + case MTTPC: 357 + features->pktlen = WACOM_PKGLEN_MTTPC; 358 + break; 364 359 365 - case BAMBOO_PT: 366 - features->pktlen = WACOM_PKGLEN_BBTOUCH; 367 - break; 360 + case BAMBOO_PT: 361 + features->pktlen = WACOM_PKGLEN_BBTOUCH; 362 + break; 368 363 369 - default: 370 - features->pktlen = WACOM_PKGLEN_GRAPHIRE; 371 - break; 372 - } 364 + default: 365 + features->pktlen = WACOM_PKGLEN_GRAPHIRE; 366 + break; 367 + } 373 368 374 - switch (features->type) { 375 - case BAMBOO_PT: 376 - features->x_phy = 377 - get_unaligned_le16(&report[i + 5]); 378 - features->x_max = 379 - get_unaligned_le16(&report[i + 8]); 380 - i += 15; 381 - break; 369 + switch (features->type) { 370 + case BAMBOO_PT: 371 + features->x_phy = 372 + get_unaligned_le16(&report[i + 5]); 373 + features->x_max = 374 + get_unaligned_le16(&report[i + 8]); 375 + i += 15; 376 + break; 382 377 383 - case WACOM_24HDT: 384 - features->x_max = 385 - get_unaligned_le16(&report[i + 3]); 386 - features->x_phy = 387 - get_unaligned_le16(&report[i + 8]); 388 - features->unit = report[i - 1]; 389 - features->unitExpo = report[i - 3]; 390 - i += 12; 391 - break; 392 - 393 - default: 394 - features->x_max = 395 - get_unaligned_le16(&report[i + 3]); 396 - features->x_phy = 397 - get_unaligned_le16(&report[i + 6]); 398 - features->unit = report[i + 9]; 399 - features->unitExpo = report[i + 11]; 400 - i += 12; 401 - break; 402 - } 403 - } else if (pen) { 404 - /* penabled only accepts exact bytes of data */ 405 - if (features->type >= TABLETPC) 406 - features->pktlen = WACOM_PKGLEN_GRAPHIRE; 407 - features->device_type = BTN_TOOL_PEN; 378 + case WACOM_24HDT: 408 379 features->x_max = 409 380 get_unaligned_le16(&report[i + 3]); 410 - i += 4; 381 + features->x_phy = 382 + get_unaligned_le16(&report[i + 8]); 383 + features->unit = report[i - 1]; 384 + features->unitExpo = report[i - 3]; 385 + i += 12; 386 + break; 387 + 388 + default: 389 + features->x_max = 390 + get_unaligned_le16(&report[i + 3]); 391 + features->x_phy = 392 + get_unaligned_le16(&report[i + 6]); 393 + features->unit = report[i + 9]; 394 + features->unitExpo = report[i + 11]; 395 + i += 12; 396 + break; 411 397 } 398 + } else if (pen) { 399 + /* penabled only accepts exact bytes of data */ 400 + if (features->type >= TABLETPC) 401 + features->pktlen = WACOM_PKGLEN_GRAPHIRE; 402 + features->device_type = BTN_TOOL_PEN; 403 + features->x_max = 404 + get_unaligned_le16(&report[i + 3]); 405 + i += 4; 412 406 } 413 407 break; 414 408 415 409 case HID_USAGE_Y: 416 - if (usage == WCM_DESKTOP) { 417 - if (finger) { 418 - switch (features->type) { 419 - case TABLETPC2FG: 420 - case MTSCREEN: 421 - case MTTPC: 422 - features->y_max = 423 - get_unaligned_le16(&report[i + 3]); 424 - features->y_phy = 425 - get_unaligned_le16(&report[i + 6]); 426 - i += 7; 427 - break; 428 - 429 - case WACOM_24HDT: 430 - features->y_max = 431 - get_unaligned_le16(&report[i + 3]); 432 - features->y_phy = 433 - get_unaligned_le16(&report[i - 2]); 434 - i += 7; 435 - break; 436 - 437 - case BAMBOO_PT: 438 - features->y_phy = 439 - get_unaligned_le16(&report[i + 3]); 440 - features->y_max = 441 - get_unaligned_le16(&report[i + 6]); 442 - i += 12; 443 - break; 444 - 445 - default: 446 - features->y_max = 447 - features->x_max; 448 - features->y_phy = 449 - get_unaligned_le16(&report[i + 3]); 450 - i += 4; 451 - break; 452 - } 453 - } else if (pen) { 410 + if (finger) { 411 + switch (features->type) { 412 + case TABLETPC2FG: 413 + case MTSCREEN: 414 + case MTTPC: 454 415 features->y_max = 455 416 get_unaligned_le16(&report[i + 3]); 417 + features->y_phy = 418 + get_unaligned_le16(&report[i + 6]); 419 + i += 7; 420 + break; 421 + 422 + case WACOM_24HDT: 423 + features->y_max = 424 + get_unaligned_le16(&report[i + 3]); 425 + features->y_phy = 426 + get_unaligned_le16(&report[i - 2]); 427 + i += 7; 428 + break; 429 + 430 + case BAMBOO_PT: 431 + features->y_phy = 432 + get_unaligned_le16(&report[i + 3]); 433 + features->y_max = 434 + get_unaligned_le16(&report[i + 6]); 435 + i += 12; 436 + break; 437 + 438 + default: 439 + features->y_max = 440 + features->x_max; 441 + features->y_phy = 442 + get_unaligned_le16(&report[i + 3]); 456 443 i += 4; 444 + break; 457 445 } 446 + } else if (pen) { 447 + features->y_max = 448 + get_unaligned_le16(&report[i + 3]); 449 + i += 4; 458 450 } 459 451 break; 460 452 ··· 466 484 wacom_retrieve_report_data(intf, features); 467 485 i++; 468 486 break; 487 + 488 + case HID_USAGE_PRESSURE: 489 + if (pen) { 490 + features->pressure_max = 491 + get_unaligned_le16(&report[i + 3]); 492 + i += 4; 493 + } 494 + break; 469 495 } 470 496 break; 471 497 472 498 case HID_COLLECTION_END: 473 499 /* reset UsagePage and Finger */ 474 - finger = usage = 0; 500 + finger = page = 0; 475 501 break; 476 502 477 503 case HID_COLLECTION:
+10 -19
drivers/input/tablet/wacom_wac.c
··· 178 178 179 179 static int wacom_dtu_irq(struct wacom_wac *wacom) 180 180 { 181 - struct wacom_features *features = &wacom->features; 182 - char *data = wacom->data; 181 + unsigned char *data = wacom->data; 183 182 struct input_dev *input = wacom->input; 184 - int prox = data[1] & 0x20, pressure; 183 + int prox = data[1] & 0x20; 185 184 186 185 dev_dbg(input->dev.parent, 187 186 "%s: received report #%d", __func__, data[0]); ··· 197 198 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); 198 199 input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2])); 199 200 input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4])); 200 - pressure = ((data[7] & 0x01) << 8) | data[6]; 201 - if (pressure < 0) 202 - pressure = features->pressure_max + pressure + 1; 203 - input_report_abs(input, ABS_PRESSURE, pressure); 201 + input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x01) << 8) | data[6]); 204 202 input_report_key(input, BTN_TOUCH, data[1] & 0x05); 205 203 if (!prox) /* out-prox */ 206 204 wacom->id[0] = 0; ··· 902 906 static int wacom_24hdt_irq(struct wacom_wac *wacom) 903 907 { 904 908 struct input_dev *input = wacom->input; 905 - char *data = wacom->data; 909 + unsigned char *data = wacom->data; 906 910 int i; 907 911 int current_num_contacts = data[61]; 908 912 int contacts_to_send = 0; ··· 955 959 static int wacom_mt_touch(struct wacom_wac *wacom) 956 960 { 957 961 struct input_dev *input = wacom->input; 958 - char *data = wacom->data; 962 + unsigned char *data = wacom->data; 959 963 int i; 960 964 int current_num_contacts = data[2]; 961 965 int contacts_to_send = 0; ··· 1034 1038 1035 1039 static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len) 1036 1040 { 1037 - char *data = wacom->data; 1041 + unsigned char *data = wacom->data; 1038 1042 struct input_dev *input = wacom->input; 1039 1043 bool prox; 1040 1044 int x = 0, y = 0; ··· 1070 1074 1071 1075 static int wacom_tpc_pen(struct wacom_wac *wacom) 1072 1076 { 1073 - struct wacom_features *features = &wacom->features; 1074 - char *data = wacom->data; 1077 + unsigned char *data = wacom->data; 1075 1078 struct input_dev *input = wacom->input; 1076 - int pressure; 1077 1079 bool prox = data[1] & 0x20; 1078 1080 1079 1081 if (!wacom->shared->stylus_in_proximity) /* first in prox */ ··· 1087 1093 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); 1088 1094 input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2])); 1089 1095 input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4])); 1090 - pressure = ((data[7] & 0x01) << 8) | data[6]; 1091 - if (pressure < 0) 1092 - pressure = features->pressure_max + pressure + 1; 1093 - input_report_abs(input, ABS_PRESSURE, pressure); 1096 + input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x03) << 8) | data[6]); 1094 1097 input_report_key(input, BTN_TOUCH, data[1] & 0x05); 1095 1098 input_report_key(input, wacom->tool[0], prox); 1096 1099 return 1; ··· 1098 1107 1099 1108 static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) 1100 1109 { 1101 - char *data = wacom->data; 1110 + unsigned char *data = wacom->data; 1102 1111 1103 1112 dev_dbg(wacom->input->dev.parent, 1104 1113 "%s: received report #%d\n", __func__, data[0]); ··· 1829 1838 case DTU: 1830 1839 if (features->type == DTUS) { 1831 1840 input_set_capability(input_dev, EV_MSC, MSC_SERIAL); 1832 - for (i = 0; i < 3; i++) 1841 + for (i = 0; i < 4; i++) 1833 1842 __set_bit(BTN_0 + i, input_dev->keybit); 1834 1843 } 1835 1844 __set_bit(BTN_TOOL_PEN, input_dev->keybit);
+1 -1
drivers/input/touchscreen/ads7846.c
··· 425 425 name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ 426 426 { \ 427 427 struct ads7846 *ts = dev_get_drvdata(dev); \ 428 - ssize_t v = ads7846_read12_ser(dev, \ 428 + ssize_t v = ads7846_read12_ser(&ts->spi->dev, \ 429 429 READ_12BIT_SER(var)); \ 430 430 if (v < 0) \ 431 431 return v; \
+1
include/linux/serio.h
··· 23 23 24 24 char name[32]; 25 25 char phys[32]; 26 + char firmware_id[128]; 26 27 27 28 bool manual_bind; 28 29
+1
include/uapi/linux/input.h
··· 164 164 #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ 165 165 #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ 166 166 #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ 167 + #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ 167 168 168 169 #define INPUT_PROP_MAX 0x1f 169 170 #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)