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 subsystem fixes from Dmitry Torokhov:
"Just minor driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: twl4030-vibra - do not reparent to grandparent
Input: twl6040-vibra - do not reparent to grandparent
Input: twl6040-vibra - ignore return value of schedule_work
Input: twl6040-vibra - fix NULL pointer dereference by removing workqueue
Input: pmic8xxx-pwrkey - fix algorithm for converting trigger delay
Input: arizona-haptic - don't assign input_dev parent
Input: clarify we want BTN_TOOL_<name> on proximity
Input: xpad - add Mad Catz FightStick TE 2 VID/PID
Input: gtco - fix crash on detecting device without endpoints

+20 -13
+4
Documentation/input/event-codes.txt
··· 173 173 proximity of the device and while the value of the BTN_TOUCH code is 0. If 174 174 the input device may be used freely in three dimensions, consider ABS_Z 175 175 instead. 176 + - BTN_TOOL_<name> should be set to 1 when the tool comes into detectable 177 + proximity and set to 0 when the tool leaves detectable proximity. 178 + BTN_TOOL_<name> signals the type of tool that is currently detected by the 179 + hardware and is otherwise independent of ABS_DISTANCE and/or BTN_TOUCH. 176 180 177 181 * ABS_MT_<name>: 178 182 - Used to describe multitouch input events. Please see
+2
drivers/input/joystick/xpad.c
··· 153 153 { 0x0738, 0x4728, "Mad Catz Street Fighter IV FightPad", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, 154 154 { 0x0738, 0x4738, "Mad Catz Wired Xbox 360 Controller (SFIV)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, 155 155 { 0x0738, 0x4740, "Mad Catz Beat Pad", 0, XTYPE_XBOX360 }, 156 + { 0x0738, 0x4a01, "Mad Catz FightStick TE 2", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, 156 157 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 157 158 { 0x0738, 0xb726, "Mad Catz Xbox controller - MW2", 0, XTYPE_XBOX360 }, 158 159 { 0x0738, 0xbeef, "Mad Catz JOYTECH NEO SE Advanced GamePad", XTYPE_XBOX360 }, ··· 305 304 XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */ 306 305 XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */ 307 306 { USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */ 307 + XPAD_XBOXONE_VENDOR(0x0738), /* Mad Catz FightStick TE 2 */ 308 308 XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */ 309 309 XPAD_XBOX360_VENDOR(0x12ab), /* X-Box 360 dance pads */ 310 310 XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */
-1
drivers/input/misc/arizona-haptics.c
··· 178 178 input_set_drvdata(haptics->input_dev, haptics); 179 179 180 180 haptics->input_dev->name = "arizona:haptics"; 181 - haptics->input_dev->dev.parent = pdev->dev.parent; 182 181 haptics->input_dev->close = arizona_haptics_close; 183 182 __set_bit(FF_RUMBLE, haptics->input_dev->ffbit); 184 183
+4 -3
drivers/input/misc/pmic8xxx-pwrkey.c
··· 353 353 if (of_property_read_u32(pdev->dev.of_node, "debounce", &kpd_delay)) 354 354 kpd_delay = 15625; 355 355 356 - if (kpd_delay > 62500 || kpd_delay == 0) { 356 + /* Valid range of pwr key trigger delay is 1/64 sec to 2 seconds. */ 357 + if (kpd_delay > USEC_PER_SEC * 2 || kpd_delay < USEC_PER_SEC / 64) { 357 358 dev_err(&pdev->dev, "invalid power key trigger delay\n"); 358 359 return -EINVAL; 359 360 } ··· 386 385 pwr->name = "pmic8xxx_pwrkey"; 387 386 pwr->phys = "pmic8xxx_pwrkey/input0"; 388 387 389 - delay = (kpd_delay << 10) / USEC_PER_SEC; 390 - delay = 1 + ilog2(delay); 388 + delay = (kpd_delay << 6) / USEC_PER_SEC; 389 + delay = ilog2(delay); 391 390 392 391 err = regmap_read(regmap, PON_CNTL_1, &pon_cntl); 393 392 if (err < 0) {
-1
drivers/input/misc/twl4030-vibra.c
··· 222 222 223 223 info->input_dev->name = "twl4030:vibrator"; 224 224 info->input_dev->id.version = 1; 225 - info->input_dev->dev.parent = pdev->dev.parent; 226 225 info->input_dev->close = twl4030_vibra_close; 227 226 __set_bit(FF_RUMBLE, info->input_dev->ffbit); 228 227
+1 -7
drivers/input/misc/twl6040-vibra.c
··· 45 45 struct vibra_info { 46 46 struct device *dev; 47 47 struct input_dev *input_dev; 48 - struct workqueue_struct *workqueue; 49 48 struct work_struct play_work; 50 49 struct mutex mutex; 51 50 int irq; ··· 212 213 info->strong_speed = effect->u.rumble.strong_magnitude; 213 214 info->direction = effect->direction < EFFECT_DIR_180_DEG ? 1 : -1; 214 215 215 - ret = queue_work(info->workqueue, &info->play_work); 216 - if (!ret) { 217 - dev_info(&input->dev, "work is already on queue\n"); 218 - return ret; 219 - } 216 + schedule_work(&info->play_work); 220 217 221 218 return 0; 222 219 } ··· 357 362 358 363 info->input_dev->name = "twl6040:vibrator"; 359 364 info->input_dev->id.version = 1; 360 - info->input_dev->dev.parent = pdev->dev.parent; 361 365 info->input_dev->close = twl6040_vibra_close; 362 366 __set_bit(FF_RUMBLE, info->input_dev->ffbit); 363 367
+9 -1
drivers/input/tablet/gtco.c
··· 858 858 goto err_free_buf; 859 859 } 860 860 861 + /* Sanity check that a device has an endpoint */ 862 + if (usbinterface->altsetting[0].desc.bNumEndpoints < 1) { 863 + dev_err(&usbinterface->dev, 864 + "Invalid number of endpoints\n"); 865 + error = -EINVAL; 866 + goto err_free_urb; 867 + } 868 + 861 869 /* 862 870 * The endpoint is always altsetting 0, we know this since we know 863 871 * this device only has one interrupt endpoint ··· 887 879 * HID report descriptor 888 880 */ 889 881 if (usb_get_extra_descriptor(usbinterface->cur_altsetting, 890 - HID_DEVICE_TYPE, &hid_desc) != 0){ 882 + HID_DEVICE_TYPE, &hid_desc) != 0) { 891 883 dev_err(&usbinterface->dev, 892 884 "Can't retrieve exta USB descriptor to get hid report descriptor length\n"); 893 885 error = -EIO;