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

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ad7877 - keep dma rx buffers in seperate cache lines
Input: psmouse - reset all types of mice before reconnecting
Input: elantech - use all 3 bytes when checking version
Input: iforce - fix Guillemot Jet Leader 3D entry
Input: iforce - add Guillemot Jet Leader Force Feedback

+42 -23
+5 -1
drivers/input/joystick/iforce/iforce-main.c
··· 54 54 static signed short abs_joystick[] = 55 55 { ABS_X, ABS_Y, ABS_THROTTLE, ABS_HAT0X, ABS_HAT0Y, -1 }; 56 56 57 + static signed short abs_joystick_rudder[] = 58 + { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER, ABS_HAT0X, ABS_HAT0Y, -1 }; 59 + 57 60 static signed short abs_avb_pegasus[] = 58 61 { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER, ABS_HAT0X, ABS_HAT0Y, 59 62 ABS_HAT1X, ABS_HAT1Y, -1 }; ··· 79 76 { 0x061c, 0xc0a4, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, //? 80 77 { 0x061c, 0xc084, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, 81 78 { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //? 79 + { 0x06f8, 0x0001, "Guillemot Jet Leader Force Feedback", btn_joystick, abs_joystick_rudder, ff_iforce }, 82 80 { 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? 83 - { 0x06f8, 0x0004, "Gullemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? 81 + { 0x06f8, 0xa302, "Guillemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? 84 82 { 0x06d6, 0x29bc, "Trust Force Feedback Race Master", btn_wheel, abs_wheel, ff_iforce }, 85 83 { 0x0000, 0x0000, "Unknown I-Force Device [%04x:%04x]", btn_joystick, abs_joystick, ff_iforce } 86 84 };
+1
drivers/input/joystick/iforce/iforce-usb.c
··· 212 212 { USB_DEVICE(0x061c, 0xc0a4) }, /* ACT LABS Force RS */ 213 213 { USB_DEVICE(0x061c, 0xc084) }, /* ACT LABS Force RS */ 214 214 { USB_DEVICE(0x06f8, 0x0001) }, /* Guillemot Race Leader Force Feedback */ 215 + { USB_DEVICE(0x06f8, 0x0003) }, /* Guillemot Jet Leader Force Feedback */ 215 216 { USB_DEVICE(0x06f8, 0x0004) }, /* Guillemot Force Feedback Racing Wheel */ 216 217 { USB_DEVICE(0x06f8, 0xa302) }, /* Guillemot Jet Leader 3D */ 217 218 { } /* Terminating entry */
+12 -12
drivers/input/mouse/elantech.c
··· 185 185 int fingers; 186 186 static int old_fingers; 187 187 188 - if (etd->fw_version_maj == 0x01) { 188 + if (etd->fw_version < 0x020000) { 189 189 /* 190 190 * byte 0: D U p1 p2 1 p3 R L 191 191 * byte 1: f 0 th tw x9 x8 y9 y8 ··· 227 227 input_report_key(dev, BTN_LEFT, packet[0] & 0x01); 228 228 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); 229 229 230 - if ((etd->fw_version_maj == 0x01) && 230 + if (etd->fw_version < 0x020000 && 231 231 (etd->capabilities & ETP_CAP_HAS_ROCKER)) { 232 232 /* rocker up */ 233 233 input_report_key(dev, BTN_FORWARD, packet[0] & 0x40); ··· 321 321 unsigned char p1, p2, p3; 322 322 323 323 /* Parity bits are placed differently */ 324 - if (etd->fw_version_maj == 0x01) { 324 + if (etd->fw_version < 0x020000) { 325 325 /* byte 0: D U p1 p2 1 p3 R L */ 326 326 p1 = (packet[0] & 0x20) >> 5; 327 327 p2 = (packet[0] & 0x10) >> 4; ··· 457 457 switch (etd->hw_version) { 458 458 case 1: 459 459 /* Rocker button */ 460 - if ((etd->fw_version_maj == 0x01) && 460 + if (etd->fw_version < 0x020000 && 461 461 (etd->capabilities & ETP_CAP_HAS_ROCKER)) { 462 462 __set_bit(BTN_FORWARD, dev->keybit); 463 463 __set_bit(BTN_BACK, dev->keybit); ··· 686 686 pr_err("elantech.c: failed to query firmware version.\n"); 687 687 goto init_fail; 688 688 } 689 - etd->fw_version_maj = param[0]; 690 - etd->fw_version_min = param[2]; 689 + 690 + etd->fw_version = (param[0] << 16) | (param[1] << 8) | param[2]; 691 691 692 692 /* 693 693 * Assume every version greater than this is new EeePC style 694 694 * hardware with 6 byte packets 695 695 */ 696 - if ((etd->fw_version_maj == 0x02 && etd->fw_version_min >= 0x30) || 697 - etd->fw_version_maj > 0x02) { 696 + if (etd->fw_version >= 0x020030) { 698 697 etd->hw_version = 2; 699 698 /* For now show extra debug information */ 700 699 etd->debug = 1; ··· 703 704 etd->hw_version = 1; 704 705 etd->paritycheck = 1; 705 706 } 706 - pr_info("elantech.c: assuming hardware version %d, firmware version %d.%d\n", 707 - etd->hw_version, etd->fw_version_maj, etd->fw_version_min); 707 + 708 + pr_info("elantech.c: assuming hardware version %d, firmware version %d.%d.%d\n", 709 + etd->hw_version, param[0], param[1], param[2]); 708 710 709 711 if (synaptics_send_cmd(psmouse, ETP_CAPABILITIES_QUERY, param)) { 710 712 pr_err("elantech.c: failed to query capabilities.\n"); ··· 720 720 * a touch action starts causing the mouse cursor or scrolled page 721 721 * to jump. Enable a workaround. 722 722 */ 723 - if (etd->fw_version_maj == 0x02 && etd->fw_version_min == 0x22) { 724 - pr_info("elantech.c: firmware version 2.34 detected, " 723 + if (etd->fw_version == 0x020022) { 724 + pr_info("elantech.c: firmware version 2.0.34 detected, " 725 725 "enabling jumpy cursor workaround\n"); 726 726 etd->jumpy_cursor = 1; 727 727 }
+2 -3
drivers/input/mouse/elantech.h
··· 100 100 unsigned char reg_26; 101 101 unsigned char debug; 102 102 unsigned char capabilities; 103 - unsigned char fw_version_maj; 104 - unsigned char fw_version_min; 105 - unsigned char hw_version; 106 103 unsigned char paritycheck; 107 104 unsigned char jumpy_cursor; 105 + unsigned char hw_version; 106 + unsigned int fw_version; 108 107 unsigned char parity[256]; 109 108 }; 110 109
+10 -4
drivers/input/mouse/psmouse-base.c
··· 1394 1394 struct psmouse *psmouse = serio_get_drvdata(serio); 1395 1395 struct psmouse *parent = NULL; 1396 1396 struct serio_driver *drv = serio->drv; 1397 + unsigned char type; 1397 1398 int rc = -1; 1398 1399 1399 1400 if (!drv || !psmouse) { ··· 1414 1413 if (psmouse->reconnect) { 1415 1414 if (psmouse->reconnect(psmouse)) 1416 1415 goto out; 1417 - } else if (psmouse_probe(psmouse) < 0 || 1418 - psmouse->type != psmouse_extensions(psmouse, 1419 - psmouse_max_proto, false)) { 1420 - goto out; 1416 + } else { 1417 + psmouse_reset(psmouse); 1418 + 1419 + if (psmouse_probe(psmouse) < 0) 1420 + goto out; 1421 + 1422 + type = psmouse_extensions(psmouse, psmouse_max_proto, false); 1423 + if (psmouse->type != type) 1424 + goto out; 1421 1425 } 1422 1426 1423 1427 /* ok, the device type (and capabilities) match the old one,
+12 -3
drivers/input/touchscreen/ad7877.c
··· 156 156 u16 reset; 157 157 u16 ref_on; 158 158 u16 command; 159 - u16 sample; 160 159 struct spi_message msg; 161 160 struct spi_transfer xfer[6]; 161 + 162 + /* 163 + * DMA (thus cache coherency maintenance) requires the 164 + * transfer buffers to live in their own cache lines. 165 + */ 166 + u16 sample ____cacheline_aligned; 162 167 }; 163 168 164 169 struct ad7877 { ··· 187 182 u8 averaging; 188 183 u8 pen_down_acc_interval; 189 184 190 - u16 conversion_data[AD7877_NR_SENSE]; 191 - 192 185 struct spi_transfer xfer[AD7877_NR_SENSE + 2]; 193 186 struct spi_message msg; 194 187 ··· 198 195 spinlock_t lock; 199 196 struct timer_list timer; /* P: lock */ 200 197 unsigned pending:1; /* P: lock */ 198 + 199 + /* 200 + * DMA (thus cache coherency maintenance) requires the 201 + * transfer buffers to live in their own cache lines. 202 + */ 203 + u16 conversion_data[AD7877_NR_SENSE] ____cacheline_aligned; 201 204 }; 202 205 203 206 static int gpio3;