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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull input layer fixes from Dmitry Torokhov:
"Second round of updates for the input subsystem. Mostly small fixups
to the code merged in the first round (atmel_mxt_ts, wacom) but also a
smallish patch to xbox driver to support Xbox One controllers and a
patch to better handle Synaptics profile sensors found in Cr-48
Chromebooks that should not affect any other devices"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: edt-ft5x06 - remove superfluous assignment
Input: xpad - add support for Xbox One controllers
Input: atmel_mxt_ts - fix a few issues reported by Coverity
Input: atmel_mxt_ts - split config update a bit
Input: atmel_mxt_ts - simplify mxt_initialize a bit
Input: joystick - use get_cycles on ARMv8
Input: wacom - fix compiler warning if !CONFIG_PM
Input: cap1106 - allow changing key mapping from userspace
Input: synaptics - use firmware data for Cr-48
Input: synaptics - properly initialize slots for semi-MT
Input: MT - make slot cleanup callable outside mt_sync_frame()
Input: atmel_mxt_ts - mXT224 DMA quirk was fixed in firmware v2.0.AA

+491 -231
+2
drivers/hid/wacom_sys.c
··· 1416 1416 kfree(wacom); 1417 1417 } 1418 1418 1419 + #ifdef CONFIG_PM 1419 1420 static int wacom_resume(struct hid_device *hdev) 1420 1421 { 1421 1422 struct wacom *wacom = hid_get_drvdata(hdev); ··· 1437 1436 { 1438 1437 return wacom_resume(hdev); 1439 1438 } 1439 + #endif /* CONFIG_PM */ 1440 1440 1441 1441 static struct hid_driver wacom_driver = { 1442 1442 .name = "wacom",
+27 -11
drivers/input/input-mt.c
··· 237 237 EXPORT_SYMBOL(input_mt_report_pointer_emulation); 238 238 239 239 /** 240 + * input_mt_drop_unused() - Inactivate slots not seen in this frame 241 + * @dev: input device with allocated MT slots 242 + * 243 + * Lift all slots not seen since the last call to this function. 244 + */ 245 + void input_mt_drop_unused(struct input_dev *dev) 246 + { 247 + struct input_mt *mt = dev->mt; 248 + int i; 249 + 250 + if (!mt) 251 + return; 252 + 253 + for (i = 0; i < mt->num_slots; i++) { 254 + if (!input_mt_is_used(mt, &mt->slots[i])) { 255 + input_mt_slot(dev, i); 256 + input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1); 257 + } 258 + } 259 + 260 + mt->frame++; 261 + } 262 + EXPORT_SYMBOL(input_mt_drop_unused); 263 + 264 + /** 240 265 * input_mt_sync_frame() - synchronize mt frame 241 266 * @dev: input device with allocated MT slots 242 267 * ··· 272 247 void input_mt_sync_frame(struct input_dev *dev) 273 248 { 274 249 struct input_mt *mt = dev->mt; 275 - struct input_mt_slot *s; 276 250 bool use_count = false; 277 251 278 252 if (!mt) 279 253 return; 280 254 281 - if (mt->flags & INPUT_MT_DROP_UNUSED) { 282 - for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { 283 - if (input_mt_is_used(mt, s)) 284 - continue; 285 - input_mt_slot(dev, s - mt->slots); 286 - input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1); 287 - } 288 - } 255 + if (mt->flags & INPUT_MT_DROP_UNUSED) 256 + input_mt_drop_unused(dev); 289 257 290 258 if ((mt->flags & INPUT_MT_POINTER) && !(mt->flags & INPUT_MT_SEMI_MT)) 291 259 use_count = true; 292 260 293 261 input_mt_report_pointer_emulation(dev, use_count); 294 - 295 - mt->frame++; 296 262 } 297 263 EXPORT_SYMBOL(input_mt_sync_frame); 298 264
+1 -1
drivers/input/joystick/analog.c
··· 158 158 #define GET_TIME(x) rdtscl(x) 159 159 #define DELTA(x,y) ((y)-(x)) 160 160 #define TIME_NAME "TSC" 161 - #elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE) 161 + #elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE) 162 162 #define GET_TIME(x) do { x = get_cycles(); } while (0) 163 163 #define DELTA(x,y) ((y)-(x)) 164 164 #define TIME_NAME "get_cycles"
+157 -17
drivers/input/joystick/xpad.c
··· 95 95 #define XTYPE_XBOX 0 96 96 #define XTYPE_XBOX360 1 97 97 #define XTYPE_XBOX360W 2 98 - #define XTYPE_UNKNOWN 3 98 + #define XTYPE_XBOXONE 3 99 + #define XTYPE_UNKNOWN 4 99 100 100 101 static bool dpad_to_buttons; 101 102 module_param(dpad_to_buttons, bool, S_IRUGO); ··· 122 121 { 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX }, 123 122 { 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", 0, XTYPE_XBOX }, 124 123 { 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 }, 124 + { 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE }, 125 125 { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, 126 126 { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, 127 127 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, ··· 233 231 -1 234 232 }; 235 233 236 - /* Xbox 360 has a vendor-specific class, so we cannot match it with only 234 + /* 235 + * Xbox 360 has a vendor-specific class, so we cannot match it with only 237 236 * USB_INTERFACE_INFO (also specifically refused by USB subsystem), so we 238 237 * match against vendor id as well. Wired Xbox 360 devices have protocol 1, 239 - * wireless controllers have protocol 129. */ 238 + * wireless controllers have protocol 129. 239 + */ 240 240 #define XPAD_XBOX360_VENDOR_PROTOCOL(vend,pr) \ 241 241 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \ 242 242 .idVendor = (vend), \ ··· 249 245 { XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \ 250 246 { XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) } 251 247 248 + /* The Xbox One controller uses subclass 71 and protocol 208. */ 249 + #define XPAD_XBOXONE_VENDOR_PROTOCOL(vend, pr) \ 250 + .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \ 251 + .idVendor = (vend), \ 252 + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, \ 253 + .bInterfaceSubClass = 71, \ 254 + .bInterfaceProtocol = (pr) 255 + #define XPAD_XBOXONE_VENDOR(vend) \ 256 + { XPAD_XBOXONE_VENDOR_PROTOCOL(vend, 208) } 257 + 252 258 static struct usb_device_id xpad_table[] = { 253 259 { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ 254 260 XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */ 261 + XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */ 255 262 XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */ 256 263 XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */ 257 264 { USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */ ··· 293 278 struct urb *bulk_out; 294 279 unsigned char *bdata; 295 280 296 - #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) 297 281 struct urb *irq_out; /* urb for interrupt out report */ 298 282 unsigned char *odata; /* output data */ 299 283 dma_addr_t odata_dma; 300 284 struct mutex odata_mutex; 301 - #endif 302 285 303 286 #if defined(CONFIG_JOYSTICK_XPAD_LEDS) 304 287 struct xpad_led *led; ··· 483 470 xpad360_process_packet(xpad, cmd, &data[4]); 484 471 } 485 472 473 + /* 474 + * xpadone_process_buttons 475 + * 476 + * Process a button update packet from an Xbox one controller. 477 + */ 478 + static void xpadone_process_buttons(struct usb_xpad *xpad, 479 + struct input_dev *dev, 480 + unsigned char *data) 481 + { 482 + /* menu/view buttons */ 483 + input_report_key(dev, BTN_START, data[4] & 0x04); 484 + input_report_key(dev, BTN_SELECT, data[4] & 0x08); 485 + 486 + /* buttons A,B,X,Y */ 487 + input_report_key(dev, BTN_A, data[4] & 0x10); 488 + input_report_key(dev, BTN_B, data[4] & 0x20); 489 + input_report_key(dev, BTN_X, data[4] & 0x40); 490 + input_report_key(dev, BTN_Y, data[4] & 0x80); 491 + 492 + /* digital pad */ 493 + if (xpad->mapping & MAP_DPAD_TO_BUTTONS) { 494 + /* dpad as buttons (left, right, up, down) */ 495 + input_report_key(dev, BTN_TRIGGER_HAPPY1, data[5] & 0x04); 496 + input_report_key(dev, BTN_TRIGGER_HAPPY2, data[5] & 0x08); 497 + input_report_key(dev, BTN_TRIGGER_HAPPY3, data[5] & 0x01); 498 + input_report_key(dev, BTN_TRIGGER_HAPPY4, data[5] & 0x02); 499 + } else { 500 + input_report_abs(dev, ABS_HAT0X, 501 + !!(data[5] & 0x08) - !!(data[5] & 0x04)); 502 + input_report_abs(dev, ABS_HAT0Y, 503 + !!(data[5] & 0x02) - !!(data[5] & 0x01)); 504 + } 505 + 506 + /* TL/TR */ 507 + input_report_key(dev, BTN_TL, data[5] & 0x10); 508 + input_report_key(dev, BTN_TR, data[5] & 0x20); 509 + 510 + /* stick press left/right */ 511 + input_report_key(dev, BTN_THUMBL, data[5] & 0x40); 512 + input_report_key(dev, BTN_THUMBR, data[5] & 0x80); 513 + 514 + if (!(xpad->mapping & MAP_STICKS_TO_NULL)) { 515 + /* left stick */ 516 + input_report_abs(dev, ABS_X, 517 + (__s16) le16_to_cpup((__le16 *)(data + 10))); 518 + input_report_abs(dev, ABS_Y, 519 + ~(__s16) le16_to_cpup((__le16 *)(data + 12))); 520 + 521 + /* right stick */ 522 + input_report_abs(dev, ABS_RX, 523 + (__s16) le16_to_cpup((__le16 *)(data + 14))); 524 + input_report_abs(dev, ABS_RY, 525 + ~(__s16) le16_to_cpup((__le16 *)(data + 16))); 526 + } 527 + 528 + /* triggers left/right */ 529 + if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) { 530 + input_report_key(dev, BTN_TL2, 531 + (__u16) le16_to_cpup((__le16 *)(data + 6))); 532 + input_report_key(dev, BTN_TR2, 533 + (__u16) le16_to_cpup((__le16 *)(data + 8))); 534 + } else { 535 + input_report_abs(dev, ABS_Z, 536 + (__u16) le16_to_cpup((__le16 *)(data + 6))); 537 + input_report_abs(dev, ABS_RZ, 538 + (__u16) le16_to_cpup((__le16 *)(data + 8))); 539 + } 540 + 541 + input_sync(dev); 542 + } 543 + 544 + /* 545 + * xpadone_process_packet 546 + * 547 + * Completes a request by converting the data into events for the 548 + * input subsystem. This version is for the Xbox One controller. 549 + * 550 + * The report format was gleaned from 551 + * https://github.com/kylelemons/xbox/blob/master/xbox.go 552 + */ 553 + 554 + static void xpadone_process_packet(struct usb_xpad *xpad, 555 + u16 cmd, unsigned char *data) 556 + { 557 + struct input_dev *dev = xpad->dev; 558 + 559 + switch (data[0]) { 560 + case 0x20: 561 + xpadone_process_buttons(xpad, dev, data); 562 + break; 563 + 564 + case 0x07: 565 + /* the xbox button has its own special report */ 566 + input_report_key(dev, BTN_MODE, data[4] & 0x01); 567 + input_sync(dev); 568 + break; 569 + } 570 + } 571 + 486 572 static void xpad_irq_in(struct urb *urb) 487 573 { 488 574 struct usb_xpad *xpad = urb->context; ··· 613 501 break; 614 502 case XTYPE_XBOX360W: 615 503 xpad360w_process_packet(xpad, 0, xpad->idata); 504 + break; 505 + case XTYPE_XBOXONE: 506 + xpadone_process_packet(xpad, 0, xpad->idata); 616 507 break; 617 508 default: 618 509 xpad_process_packet(xpad, 0, xpad->idata); ··· 650 535 } 651 536 } 652 537 653 - #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) 654 538 static void xpad_irq_out(struct urb *urb) 655 539 { 656 540 struct usb_xpad *xpad = urb->context; ··· 687 573 static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) 688 574 { 689 575 struct usb_endpoint_descriptor *ep_irq_out; 576 + int ep_irq_out_idx; 690 577 int error; 691 578 692 579 if (xpad->xtype == XTYPE_UNKNOWN) ··· 708 593 goto fail2; 709 594 } 710 595 711 - ep_irq_out = &intf->cur_altsetting->endpoint[1].desc; 596 + /* Xbox One controller has in/out endpoints swapped. */ 597 + ep_irq_out_idx = xpad->xtype == XTYPE_XBOXONE ? 0 : 1; 598 + ep_irq_out = &intf->cur_altsetting->endpoint[ep_irq_out_idx].desc; 599 + 712 600 usb_fill_int_urb(xpad->irq_out, xpad->udev, 713 601 usb_sndintpipe(xpad->udev, ep_irq_out->bEndpointAddress), 714 602 xpad->odata, XPAD_PKT_LEN, ··· 739 621 xpad->odata, xpad->odata_dma); 740 622 } 741 623 } 742 - #else 743 - static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) { return 0; } 744 - static void xpad_deinit_output(struct usb_xpad *xpad) {} 745 - static void xpad_stop_output(struct usb_xpad *xpad) {} 746 - #endif 747 624 748 625 #ifdef CONFIG_JOYSTICK_XPAD_FF 749 626 static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) ··· 805 692 806 693 static int xpad_init_ff(struct usb_xpad *xpad) 807 694 { 808 - if (xpad->xtype == XTYPE_UNKNOWN) 695 + if (xpad->xtype == XTYPE_UNKNOWN || xpad->xtype == XTYPE_XBOXONE) 809 696 return 0; 810 697 811 698 input_set_capability(xpad->dev, EV_FF, FF_RUMBLE); ··· 914 801 if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) 915 802 return -EIO; 916 803 804 + if (xpad->xtype == XTYPE_XBOXONE) { 805 + /* Xbox one controller needs to be initialized. */ 806 + xpad->odata[0] = 0x05; 807 + xpad->odata[1] = 0x20; 808 + xpad->irq_out->transfer_buffer_length = 2; 809 + return usb_submit_urb(xpad->irq_out, GFP_KERNEL); 810 + } 811 + 917 812 return 0; 918 813 } 919 814 ··· 937 816 938 817 static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs) 939 818 { 819 + struct usb_xpad *xpad = input_get_drvdata(input_dev); 940 820 set_bit(abs, input_dev->absbit); 941 821 942 822 switch (abs) { ··· 949 827 break; 950 828 case ABS_Z: 951 829 case ABS_RZ: /* the triggers (if mapped to axes) */ 952 - input_set_abs_params(input_dev, abs, 0, 255, 0, 0); 830 + if (xpad->xtype == XTYPE_XBOXONE) 831 + input_set_abs_params(input_dev, abs, 0, 1023, 0, 0); 832 + else 833 + input_set_abs_params(input_dev, abs, 0, 255, 0, 0); 953 834 break; 954 835 case ABS_HAT0X: 955 836 case ABS_HAT0Y: /* the d-pad (only if dpad is mapped to axes */ ··· 967 842 struct usb_xpad *xpad; 968 843 struct input_dev *input_dev; 969 844 struct usb_endpoint_descriptor *ep_irq_in; 845 + int ep_irq_in_idx; 970 846 int i, error; 971 847 972 848 for (i = 0; xpad_device[i].idVendor; i++) { 973 849 if ((le16_to_cpu(udev->descriptor.idVendor) == xpad_device[i].idVendor) && 974 850 (le16_to_cpu(udev->descriptor.idProduct) == xpad_device[i].idProduct)) 975 851 break; 852 + } 853 + 854 + if (xpad_device[i].xtype == XTYPE_XBOXONE && 855 + intf->cur_altsetting->desc.bInterfaceNumber != 0) { 856 + /* 857 + * The Xbox One controller lists three interfaces all with the 858 + * same interface class, subclass and protocol. Differentiate by 859 + * interface number. 860 + */ 861 + return -ENODEV; 976 862 } 977 863 978 864 xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL); ··· 1056 920 __set_bit(xpad_common_btn[i], input_dev->keybit); 1057 921 1058 922 /* set up model-specific ones */ 1059 - if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W) { 923 + if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W || 924 + xpad->xtype == XTYPE_XBOXONE) { 1060 925 for (i = 0; xpad360_btn[i] >= 0; i++) 1061 926 __set_bit(xpad360_btn[i], input_dev->keybit); 1062 927 } else { ··· 1070 933 __set_bit(xpad_btn_pad[i], input_dev->keybit); 1071 934 } else { 1072 935 for (i = 0; xpad_abs_pad[i] >= 0; i++) 1073 - xpad_set_up_abs(input_dev, xpad_abs_pad[i]); 936 + xpad_set_up_abs(input_dev, xpad_abs_pad[i]); 1074 937 } 1075 938 1076 939 if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) { ··· 1093 956 if (error) 1094 957 goto fail5; 1095 958 1096 - ep_irq_in = &intf->cur_altsetting->endpoint[0].desc; 959 + /* Xbox One controller has in/out endpoints swapped. */ 960 + ep_irq_in_idx = xpad->xtype == XTYPE_XBOXONE ? 1 : 0; 961 + ep_irq_in = &intf->cur_altsetting->endpoint[ep_irq_in_idx].desc; 962 + 1097 963 usb_fill_int_urb(xpad->irq_in, udev, 1098 964 usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), 1099 965 xpad->idata, XPAD_PKT_LEN, xpad_irq_in,
+7 -1
drivers/input/keyboard/cap1106.c
··· 64 64 struct input_dev *idev; 65 65 66 66 /* config */ 67 - unsigned int keycodes[CAP1106_NUM_CHN]; 67 + unsigned short keycodes[CAP1106_NUM_CHN]; 68 68 }; 69 69 70 70 static const struct reg_default cap1106_reg_defaults[] = { ··· 271 271 272 272 for (i = 0; i < CAP1106_NUM_CHN; i++) 273 273 __set_bit(priv->keycodes[i], priv->idev->keybit); 274 + 275 + __clear_bit(KEY_RESERVED, priv->idev->keybit); 276 + 277 + priv->idev->keycode = priv->keycodes; 278 + priv->idev->keycodesize = sizeof(priv->keycodes[0]); 279 + priv->idev->keycodemax = ARRAY_SIZE(priv->keycodes); 274 280 275 281 priv->idev->id.vendor = CAP1106_MANUFACTURER_ID; 276 282 priv->idev->id.product = CAP1106_PRODUCT_ID;
+69 -3
drivers/input/mouse/synaptics.c
··· 117 117 } 118 118 119 119 #ifdef CONFIG_MOUSE_PS2_SYNAPTICS 120 + 121 + static bool cr48_profile_sensor; 122 + 120 123 struct min_max_quirk { 121 124 const char * const *pnp_ids; 122 125 int x_min, x_max, y_min, y_max; ··· 1155 1152 priv->agm_pending = false; 1156 1153 } 1157 1154 1155 + static void synaptics_profile_sensor_process(struct psmouse *psmouse, 1156 + struct synaptics_hw_state *sgm, 1157 + int num_fingers) 1158 + { 1159 + struct input_dev *dev = psmouse->dev; 1160 + struct synaptics_data *priv = psmouse->private; 1161 + struct synaptics_hw_state *hw[2] = { sgm, &priv->agm }; 1162 + struct input_mt_pos pos[2]; 1163 + int slot[2], nsemi, i; 1164 + 1165 + nsemi = clamp_val(num_fingers, 0, 2); 1166 + 1167 + for (i = 0; i < nsemi; i++) { 1168 + pos[i].x = hw[i]->x; 1169 + pos[i].y = synaptics_invert_y(hw[i]->y); 1170 + } 1171 + 1172 + input_mt_assign_slots(dev, slot, pos, nsemi); 1173 + 1174 + for (i = 0; i < nsemi; i++) { 1175 + input_mt_slot(dev, slot[i]); 1176 + input_mt_report_slot_state(dev, MT_TOOL_FINGER, true); 1177 + input_report_abs(dev, ABS_MT_POSITION_X, pos[i].x); 1178 + input_report_abs(dev, ABS_MT_POSITION_Y, pos[i].y); 1179 + input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z); 1180 + } 1181 + 1182 + input_mt_drop_unused(dev); 1183 + input_mt_report_pointer_emulation(dev, false); 1184 + input_mt_report_finger_count(dev, num_fingers); 1185 + 1186 + synaptics_report_buttons(psmouse, sgm); 1187 + 1188 + input_sync(dev); 1189 + } 1190 + 1158 1191 /* 1159 1192 * called for each full received packet from the touchpad 1160 1193 */ ··· 1252 1213 } else { 1253 1214 num_fingers = 0; 1254 1215 finger_width = 0; 1216 + } 1217 + 1218 + if (cr48_profile_sensor) { 1219 + synaptics_profile_sensor_process(psmouse, &hw, num_fingers); 1220 + return; 1255 1221 } 1256 1222 1257 1223 if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) ··· 1404 1360 set_abs_position_params(dev, priv, ABS_X, ABS_Y); 1405 1361 input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0); 1406 1362 1363 + if (cr48_profile_sensor) 1364 + input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0); 1365 + 1407 1366 if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) { 1408 1367 set_abs_position_params(dev, priv, ABS_MT_POSITION_X, 1409 1368 ABS_MT_POSITION_Y); ··· 1418 1371 __set_bit(BTN_TOOL_QUADTAP, dev->keybit); 1419 1372 __set_bit(BTN_TOOL_QUINTTAP, dev->keybit); 1420 1373 } else if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) { 1421 - /* Non-image sensors with AGM use semi-mt */ 1422 - __set_bit(INPUT_PROP_SEMI_MT, dev->propbit); 1423 - input_mt_init_slots(dev, 2, 0); 1424 1374 set_abs_position_params(dev, priv, ABS_MT_POSITION_X, 1425 1375 ABS_MT_POSITION_Y); 1376 + /* 1377 + * Profile sensor in CR-48 tracks contacts reasonably well, 1378 + * other non-image sensors with AGM use semi-mt. 1379 + */ 1380 + input_mt_init_slots(dev, 2, 1381 + INPUT_MT_POINTER | 1382 + (cr48_profile_sensor ? 1383 + INPUT_MT_TRACK : INPUT_MT_SEMI_MT)); 1426 1384 } 1427 1385 1428 1386 if (SYN_CAP_PALMDETECT(priv->capabilities)) ··· 1629 1577 { } 1630 1578 }; 1631 1579 1580 + static const struct dmi_system_id __initconst cr48_dmi_table[] = { 1581 + #if defined(CONFIG_DMI) && defined(CONFIG_X86) 1582 + { 1583 + /* Cr-48 Chromebook (Codename Mario) */ 1584 + .matches = { 1585 + DMI_MATCH(DMI_SYS_VENDOR, "IEC"), 1586 + DMI_MATCH(DMI_PRODUCT_NAME, "Mario"), 1587 + }, 1588 + }, 1589 + #endif 1590 + { } 1591 + }; 1592 + 1632 1593 void __init synaptics_module_init(void) 1633 1594 { 1634 1595 impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table); 1635 1596 broken_olpc_ec = dmi_check_system(olpc_dmi_table); 1597 + cr48_profile_sensor = dmi_check_system(cr48_dmi_table); 1636 1598 } 1637 1599 1638 1600 static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)
+227 -197
drivers/input/touchscreen/atmel_mxt_ts.c
··· 359 359 msg.buf = val; 360 360 361 361 ret = i2c_transfer(data->client->adapter, &msg, 1); 362 - 363 362 if (ret == 1) { 364 363 ret = 0; 365 364 } else { ··· 413 414 case 0x5b: 414 415 bootloader = appmode - 0x26; 415 416 break; 417 + 416 418 default: 417 419 dev_err(&data->client->dev, 418 420 "Appmode i2c address 0x%02x not found\n", ··· 425 425 return 0; 426 426 } 427 427 428 - static int mxt_probe_bootloader(struct mxt_data *data, bool retry) 428 + static int mxt_probe_bootloader(struct mxt_data *data, bool alt_address) 429 429 { 430 430 struct device *dev = &data->client->dev; 431 - int ret; 431 + int error; 432 432 u8 val; 433 433 bool crc_failure; 434 434 435 - ret = mxt_lookup_bootloader_address(data, retry); 436 - if (ret) 437 - return ret; 435 + error = mxt_lookup_bootloader_address(data, alt_address); 436 + if (error) 437 + return error; 438 438 439 - ret = mxt_bootloader_read(data, &val, 1); 440 - if (ret) 441 - return ret; 439 + error = mxt_bootloader_read(data, &val, 1); 440 + if (error) 441 + return error; 442 442 443 443 /* Check app crc fail mode */ 444 444 crc_failure = (val & ~MXT_BOOT_STATUS_MASK) == MXT_APP_CRC_FAIL; ··· 1064 1064 return crc; 1065 1065 } 1066 1066 1067 - /* 1068 - * mxt_update_cfg - download configuration to chip 1069 - * 1070 - * Atmel Raw Config File Format 1071 - * 1072 - * The first four lines of the raw config file contain: 1073 - * 1) Version 1074 - * 2) Chip ID Information (first 7 bytes of device memory) 1075 - * 3) Chip Information Block 24-bit CRC Checksum 1076 - * 4) Chip Configuration 24-bit CRC Checksum 1077 - * 1078 - * The rest of the file consists of one line per object instance: 1079 - * <TYPE> <INSTANCE> <SIZE> <CONTENTS> 1080 - * 1081 - * <TYPE> - 2-byte object type as hex 1082 - * <INSTANCE> - 2-byte object instance number as hex 1083 - * <SIZE> - 2-byte object size as hex 1084 - * <CONTENTS> - array of <SIZE> 1-byte hex values 1085 - */ 1086 - static int mxt_update_cfg(struct mxt_data *data, const struct firmware *cfg) 1067 + static int mxt_prepare_cfg_mem(struct mxt_data *data, 1068 + const struct firmware *cfg, 1069 + unsigned int data_pos, 1070 + unsigned int cfg_start_ofs, 1071 + u8 *config_mem, 1072 + size_t config_mem_size) 1087 1073 { 1088 1074 struct device *dev = &data->client->dev; 1089 - struct mxt_info cfg_info; 1090 1075 struct mxt_object *object; 1091 - int ret; 1076 + unsigned int type, instance, size, byte_offset; 1092 1077 int offset; 1093 - int data_pos; 1094 - int byte_offset; 1078 + int ret; 1095 1079 int i; 1096 - int cfg_start_ofs; 1097 - u32 info_crc, config_crc, calculated_crc; 1098 - u8 *config_mem; 1099 - size_t config_mem_size; 1100 - unsigned int type, instance, size; 1101 - u8 val; 1102 1080 u16 reg; 1103 - 1104 - mxt_update_crc(data, MXT_COMMAND_REPORTALL, 1); 1105 - 1106 - if (strncmp(cfg->data, MXT_CFG_MAGIC, strlen(MXT_CFG_MAGIC))) { 1107 - dev_err(dev, "Unrecognised config file\n"); 1108 - ret = -EINVAL; 1109 - goto release; 1110 - } 1111 - 1112 - data_pos = strlen(MXT_CFG_MAGIC); 1113 - 1114 - /* Load information block and check */ 1115 - for (i = 0; i < sizeof(struct mxt_info); i++) { 1116 - ret = sscanf(cfg->data + data_pos, "%hhx%n", 1117 - (unsigned char *)&cfg_info + i, 1118 - &offset); 1119 - if (ret != 1) { 1120 - dev_err(dev, "Bad format\n"); 1121 - ret = -EINVAL; 1122 - goto release; 1123 - } 1124 - 1125 - data_pos += offset; 1126 - } 1127 - 1128 - if (cfg_info.family_id != data->info.family_id) { 1129 - dev_err(dev, "Family ID mismatch!\n"); 1130 - ret = -EINVAL; 1131 - goto release; 1132 - } 1133 - 1134 - if (cfg_info.variant_id != data->info.variant_id) { 1135 - dev_err(dev, "Variant ID mismatch!\n"); 1136 - ret = -EINVAL; 1137 - goto release; 1138 - } 1139 - 1140 - /* Read CRCs */ 1141 - ret = sscanf(cfg->data + data_pos, "%x%n", &info_crc, &offset); 1142 - if (ret != 1) { 1143 - dev_err(dev, "Bad format: failed to parse Info CRC\n"); 1144 - ret = -EINVAL; 1145 - goto release; 1146 - } 1147 - data_pos += offset; 1148 - 1149 - ret = sscanf(cfg->data + data_pos, "%x%n", &config_crc, &offset); 1150 - if (ret != 1) { 1151 - dev_err(dev, "Bad format: failed to parse Config CRC\n"); 1152 - ret = -EINVAL; 1153 - goto release; 1154 - } 1155 - data_pos += offset; 1156 - 1157 - /* 1158 - * The Info Block CRC is calculated over mxt_info and the object 1159 - * table. If it does not match then we are trying to load the 1160 - * configuration from a different chip or firmware version, so 1161 - * the configuration CRC is invalid anyway. 1162 - */ 1163 - if (info_crc == data->info_crc) { 1164 - if (config_crc == 0 || data->config_crc == 0) { 1165 - dev_info(dev, "CRC zero, attempting to apply config\n"); 1166 - } else if (config_crc == data->config_crc) { 1167 - dev_dbg(dev, "Config CRC 0x%06X: OK\n", 1168 - data->config_crc); 1169 - ret = 0; 1170 - goto release; 1171 - } else { 1172 - dev_info(dev, "Config CRC 0x%06X: does not match file 0x%06X\n", 1173 - data->config_crc, config_crc); 1174 - } 1175 - } else { 1176 - dev_warn(dev, 1177 - "Warning: Info CRC error - device=0x%06X file=0x%06X\n", 1178 - data->info_crc, info_crc); 1179 - } 1180 - 1181 - /* Malloc memory to store configuration */ 1182 - cfg_start_ofs = MXT_OBJECT_START + 1183 - data->info.object_num * sizeof(struct mxt_object) + 1184 - MXT_INFO_CHECKSUM_SIZE; 1185 - config_mem_size = data->mem_size - cfg_start_ofs; 1186 - config_mem = kzalloc(config_mem_size, GFP_KERNEL); 1187 - if (!config_mem) { 1188 - dev_err(dev, "Failed to allocate memory\n"); 1189 - ret = -ENOMEM; 1190 - goto release; 1191 - } 1081 + u8 val; 1192 1082 1193 1083 while (data_pos < cfg->size) { 1194 1084 /* Read type, instance, length */ ··· 1089 1199 break; 1090 1200 } else if (ret != 3) { 1091 1201 dev_err(dev, "Bad format: failed to parse object\n"); 1092 - ret = -EINVAL; 1093 - goto release_mem; 1202 + return -EINVAL; 1094 1203 } 1095 1204 data_pos += offset; 1096 1205 ··· 1098 1209 /* Skip object */ 1099 1210 for (i = 0; i < size; i++) { 1100 1211 ret = sscanf(cfg->data + data_pos, "%hhx%n", 1101 - &val, 1102 - &offset); 1212 + &val, &offset); 1213 + if (ret != 1) { 1214 + dev_err(dev, "Bad format in T%d at %d\n", 1215 + type, i); 1216 + return -EINVAL; 1217 + } 1103 1218 data_pos += offset; 1104 1219 } 1105 1220 continue; ··· 1133 1240 1134 1241 if (instance >= mxt_obj_instances(object)) { 1135 1242 dev_err(dev, "Object instances exceeded!\n"); 1136 - ret = -EINVAL; 1137 - goto release_mem; 1243 + return -EINVAL; 1138 1244 } 1139 1245 1140 1246 reg = object->start_address + mxt_obj_size(object) * instance; ··· 1143 1251 &val, 1144 1252 &offset); 1145 1253 if (ret != 1) { 1146 - dev_err(dev, "Bad format in T%d\n", type); 1147 - ret = -EINVAL; 1148 - goto release_mem; 1254 + dev_err(dev, "Bad format in T%d at %d\n", 1255 + type, i); 1256 + return -EINVAL; 1149 1257 } 1150 1258 data_pos += offset; 1151 1259 ··· 1154 1262 1155 1263 byte_offset = reg + i - cfg_start_ofs; 1156 1264 1157 - if ((byte_offset >= 0) 1158 - && (byte_offset <= config_mem_size)) { 1265 + if (byte_offset >= 0 && byte_offset < config_mem_size) { 1159 1266 *(config_mem + byte_offset) = val; 1160 1267 } else { 1161 1268 dev_err(dev, "Bad object: reg:%d, T%d, ofs=%d\n", 1162 1269 reg, object->type, byte_offset); 1163 - ret = -EINVAL; 1164 - goto release_mem; 1270 + return -EINVAL; 1165 1271 } 1166 1272 } 1167 1273 } 1274 + 1275 + return 0; 1276 + } 1277 + 1278 + static int mxt_upload_cfg_mem(struct mxt_data *data, unsigned int cfg_start, 1279 + u8 *config_mem, size_t config_mem_size) 1280 + { 1281 + unsigned int byte_offset = 0; 1282 + int error; 1283 + 1284 + /* Write configuration as blocks */ 1285 + while (byte_offset < config_mem_size) { 1286 + unsigned int size = config_mem_size - byte_offset; 1287 + 1288 + if (size > MXT_MAX_BLOCK_WRITE) 1289 + size = MXT_MAX_BLOCK_WRITE; 1290 + 1291 + error = __mxt_write_reg(data->client, 1292 + cfg_start + byte_offset, 1293 + size, config_mem + byte_offset); 1294 + if (error) { 1295 + dev_err(&data->client->dev, 1296 + "Config write error, ret=%d\n", error); 1297 + return error; 1298 + } 1299 + 1300 + byte_offset += size; 1301 + } 1302 + 1303 + return 0; 1304 + } 1305 + 1306 + /* 1307 + * mxt_update_cfg - download configuration to chip 1308 + * 1309 + * Atmel Raw Config File Format 1310 + * 1311 + * The first four lines of the raw config file contain: 1312 + * 1) Version 1313 + * 2) Chip ID Information (first 7 bytes of device memory) 1314 + * 3) Chip Information Block 24-bit CRC Checksum 1315 + * 4) Chip Configuration 24-bit CRC Checksum 1316 + * 1317 + * The rest of the file consists of one line per object instance: 1318 + * <TYPE> <INSTANCE> <SIZE> <CONTENTS> 1319 + * 1320 + * <TYPE> - 2-byte object type as hex 1321 + * <INSTANCE> - 2-byte object instance number as hex 1322 + * <SIZE> - 2-byte object size as hex 1323 + * <CONTENTS> - array of <SIZE> 1-byte hex values 1324 + */ 1325 + static int mxt_update_cfg(struct mxt_data *data, const struct firmware *cfg) 1326 + { 1327 + struct device *dev = &data->client->dev; 1328 + struct mxt_info cfg_info; 1329 + int ret; 1330 + int offset; 1331 + int data_pos; 1332 + int i; 1333 + int cfg_start_ofs; 1334 + u32 info_crc, config_crc, calculated_crc; 1335 + u8 *config_mem; 1336 + size_t config_mem_size; 1337 + 1338 + mxt_update_crc(data, MXT_COMMAND_REPORTALL, 1); 1339 + 1340 + if (strncmp(cfg->data, MXT_CFG_MAGIC, strlen(MXT_CFG_MAGIC))) { 1341 + dev_err(dev, "Unrecognised config file\n"); 1342 + return -EINVAL; 1343 + } 1344 + 1345 + data_pos = strlen(MXT_CFG_MAGIC); 1346 + 1347 + /* Load information block and check */ 1348 + for (i = 0; i < sizeof(struct mxt_info); i++) { 1349 + ret = sscanf(cfg->data + data_pos, "%hhx%n", 1350 + (unsigned char *)&cfg_info + i, 1351 + &offset); 1352 + if (ret != 1) { 1353 + dev_err(dev, "Bad format\n"); 1354 + return -EINVAL; 1355 + } 1356 + 1357 + data_pos += offset; 1358 + } 1359 + 1360 + if (cfg_info.family_id != data->info.family_id) { 1361 + dev_err(dev, "Family ID mismatch!\n"); 1362 + return -EINVAL; 1363 + } 1364 + 1365 + if (cfg_info.variant_id != data->info.variant_id) { 1366 + dev_err(dev, "Variant ID mismatch!\n"); 1367 + return -EINVAL; 1368 + } 1369 + 1370 + /* Read CRCs */ 1371 + ret = sscanf(cfg->data + data_pos, "%x%n", &info_crc, &offset); 1372 + if (ret != 1) { 1373 + dev_err(dev, "Bad format: failed to parse Info CRC\n"); 1374 + return -EINVAL; 1375 + } 1376 + data_pos += offset; 1377 + 1378 + ret = sscanf(cfg->data + data_pos, "%x%n", &config_crc, &offset); 1379 + if (ret != 1) { 1380 + dev_err(dev, "Bad format: failed to parse Config CRC\n"); 1381 + return -EINVAL; 1382 + } 1383 + data_pos += offset; 1384 + 1385 + /* 1386 + * The Info Block CRC is calculated over mxt_info and the object 1387 + * table. If it does not match then we are trying to load the 1388 + * configuration from a different chip or firmware version, so 1389 + * the configuration CRC is invalid anyway. 1390 + */ 1391 + if (info_crc == data->info_crc) { 1392 + if (config_crc == 0 || data->config_crc == 0) { 1393 + dev_info(dev, "CRC zero, attempting to apply config\n"); 1394 + } else if (config_crc == data->config_crc) { 1395 + dev_dbg(dev, "Config CRC 0x%06X: OK\n", 1396 + data->config_crc); 1397 + return 0; 1398 + } else { 1399 + dev_info(dev, "Config CRC 0x%06X: does not match file 0x%06X\n", 1400 + data->config_crc, config_crc); 1401 + } 1402 + } else { 1403 + dev_warn(dev, 1404 + "Warning: Info CRC error - device=0x%06X file=0x%06X\n", 1405 + data->info_crc, info_crc); 1406 + } 1407 + 1408 + /* Malloc memory to store configuration */ 1409 + cfg_start_ofs = MXT_OBJECT_START + 1410 + data->info.object_num * sizeof(struct mxt_object) + 1411 + MXT_INFO_CHECKSUM_SIZE; 1412 + config_mem_size = data->mem_size - cfg_start_ofs; 1413 + config_mem = kzalloc(config_mem_size, GFP_KERNEL); 1414 + if (!config_mem) { 1415 + dev_err(dev, "Failed to allocate memory\n"); 1416 + return -ENOMEM; 1417 + } 1418 + 1419 + ret = mxt_prepare_cfg_mem(data, cfg, data_pos, cfg_start_ofs, 1420 + config_mem, config_mem_size); 1421 + if (ret) 1422 + goto release_mem; 1168 1423 1169 1424 /* Calculate crc of the received configs (not the raw config file) */ 1170 1425 if (data->T7_address < cfg_start_ofs) { ··· 1325 1286 data->T7_address - cfg_start_ofs, 1326 1287 config_mem_size); 1327 1288 1328 - if (config_crc > 0 && (config_crc != calculated_crc)) 1289 + if (config_crc > 0 && config_crc != calculated_crc) 1329 1290 dev_warn(dev, "Config CRC error, calculated=%06X, file=%06X\n", 1330 1291 calculated_crc, config_crc); 1331 1292 1332 - /* Write configuration as blocks */ 1333 - byte_offset = 0; 1334 - while (byte_offset < config_mem_size) { 1335 - size = config_mem_size - byte_offset; 1336 - 1337 - if (size > MXT_MAX_BLOCK_WRITE) 1338 - size = MXT_MAX_BLOCK_WRITE; 1339 - 1340 - ret = __mxt_write_reg(data->client, 1341 - cfg_start_ofs + byte_offset, 1342 - size, config_mem + byte_offset); 1343 - if (ret != 0) { 1344 - dev_err(dev, "Config write error, ret=%d\n", ret); 1345 - goto release_mem; 1346 - } 1347 - 1348 - byte_offset += size; 1349 - } 1293 + ret = mxt_upload_cfg_mem(data, cfg_start_ofs, 1294 + config_mem, config_mem_size); 1295 + if (ret) 1296 + goto release_mem; 1350 1297 1351 1298 mxt_update_crc(data, MXT_COMMAND_BACKUPNV, MXT_BACKUP_VALUE); 1352 1299 ··· 1344 1319 1345 1320 release_mem: 1346 1321 kfree(config_mem); 1347 - release: 1348 - release_firmware(cfg); 1349 1322 return ret; 1350 1323 } 1351 1324 ··· 1445 1422 1446 1423 switch (object->type) { 1447 1424 case MXT_GEN_MESSAGE_T5: 1448 - if (data->info.family_id == 0x80) { 1425 + if (data->info.family_id == 0x80 && 1426 + data->info.version < 0x20) { 1449 1427 /* 1450 - * On mXT224 read and discard unused CRC byte 1451 - * otherwise DMA reads are misaligned 1428 + * On mXT224 firmware versions prior to V2.0 1429 + * read and discard unused CRC byte otherwise 1430 + * DMA reads are misaligned. 1452 1431 */ 1453 1432 data->T5_msg_size = mxt_obj_size(object); 1454 1433 } else { ··· 1458 1433 data->T5_msg_size = mxt_obj_size(object) - 1; 1459 1434 } 1460 1435 data->T5_address = object->start_address; 1436 + break; 1461 1437 case MXT_GEN_COMMAND_T6: 1462 1438 data->T6_reportid = min_id; 1463 1439 data->T6_address = object->start_address; ··· 1664 1638 static void mxt_config_cb(const struct firmware *cfg, void *ctx) 1665 1639 { 1666 1640 mxt_configure_objects(ctx, cfg); 1641 + release_firmware(cfg); 1667 1642 } 1668 1643 1669 1644 static int mxt_initialize(struct mxt_data *data) 1670 1645 { 1671 1646 struct i2c_client *client = data->client; 1647 + int recovery_attempts = 0; 1672 1648 int error; 1673 - bool alt_bootloader_addr = false; 1674 - bool retry = false; 1675 1649 1676 - retry_info: 1677 - error = mxt_get_info(data); 1678 - if (error) { 1679 - retry_bootloader: 1680 - error = mxt_probe_bootloader(data, alt_bootloader_addr); 1650 + while (1) { 1651 + error = mxt_get_info(data); 1652 + if (!error) 1653 + break; 1654 + 1655 + /* Check bootloader state */ 1656 + error = mxt_probe_bootloader(data, false); 1681 1657 if (error) { 1682 - if (alt_bootloader_addr) { 1658 + dev_info(&client->dev, "Trying alternate bootloader address\n"); 1659 + error = mxt_probe_bootloader(data, true); 1660 + if (error) { 1683 1661 /* Chip is not in appmode or bootloader mode */ 1684 1662 return error; 1685 1663 } 1686 - 1687 - dev_info(&client->dev, "Trying alternate bootloader address\n"); 1688 - alt_bootloader_addr = true; 1689 - goto retry_bootloader; 1690 - } else { 1691 - if (retry) { 1692 - dev_err(&client->dev, "Could not recover from bootloader mode\n"); 1693 - /* 1694 - * We can reflash from this state, so do not 1695 - * abort init 1696 - */ 1697 - data->in_bootloader = true; 1698 - return 0; 1699 - } 1700 - 1701 - /* Attempt to exit bootloader into app mode */ 1702 - mxt_send_bootloader_cmd(data, false); 1703 - msleep(MXT_FW_RESET_TIME); 1704 - retry = true; 1705 - goto retry_info; 1706 1664 } 1665 + 1666 + /* OK, we are in bootloader, see if we can recover */ 1667 + if (++recovery_attempts > 1) { 1668 + dev_err(&client->dev, "Could not recover from bootloader mode\n"); 1669 + /* 1670 + * We can reflash from this state, so do not 1671 + * abort initialization. 1672 + */ 1673 + data->in_bootloader = true; 1674 + return 0; 1675 + } 1676 + 1677 + /* Attempt to exit bootloader into app mode */ 1678 + mxt_send_bootloader_cmd(data, false); 1679 + msleep(MXT_FW_RESET_TIME); 1707 1680 } 1708 1681 1709 1682 /* Get object table information */ ··· 1712 1687 return error; 1713 1688 } 1714 1689 1715 - mxt_acquire_irq(data); 1690 + error = mxt_acquire_irq(data); 1716 1691 if (error) 1717 1692 goto err_free_object_table; 1718 1693 1719 - request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME, 1720 - &data->client->dev, GFP_KERNEL, data, 1721 - mxt_config_cb); 1694 + error = request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME, 1695 + &client->dev, GFP_KERNEL, data, 1696 + mxt_config_cb); 1697 + if (error) { 1698 + dev_err(&client->dev, "Failed to invoke firmware loader: %d\n", 1699 + error); 1700 + goto err_free_object_table; 1701 + } 1722 1702 1723 1703 return 0; 1724 1704
-1
drivers/input/touchscreen/edt-ft5x06.c
··· 262 262 case M06: 263 263 wrbuf[0] = tsdata->factory_mode ? 0xf3 : 0xfc; 264 264 wrbuf[1] = tsdata->factory_mode ? addr & 0x7f : addr & 0x3f; 265 - wrbuf[1] = tsdata->factory_mode ? addr & 0x7f : addr & 0x3f; 266 265 wrbuf[2] = value; 267 266 wrbuf[3] = wrbuf[0] ^ wrbuf[1] ^ wrbuf[2]; 268 267 return edt_ft5x06_ts_readwrite(tsdata->client, 4,
+1
include/linux/input/mt.h
··· 105 105 106 106 void input_mt_report_finger_count(struct input_dev *dev, int count); 107 107 void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); 108 + void input_mt_drop_unused(struct input_dev *dev); 108 109 109 110 void input_mt_sync_frame(struct input_dev *dev); 110 111