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

Pull input updates from Dmitry Torokhov:
"Just small driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: colibri-vf50-ts - add missing #include <linux/of.h>
Input: adp5589 - fix row 5 handling for adp5589
Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree
Input: vmmouse - fix absolute device registration
Input: serio - drop warnings in case of EPROBE_DEFER from serio_find_driver()
Input: cap11xx - add missing of_node_put
Input: sirfsoc-onkey - allow modular build
Input: xpad - remove unused function

+33 -21
-1
drivers/input/joystick/xpad.c
··· 1207 1207 #else 1208 1208 static int xpad_led_probe(struct usb_xpad *xpad) { return 0; } 1209 1209 static void xpad_led_disconnect(struct usb_xpad *xpad) { } 1210 - static void xpad_identify_controller(struct usb_xpad *xpad) { } 1211 1210 #endif 1212 1211 1213 1212 static int xpad_start_input(struct usb_xpad *xpad)
+4 -3
drivers/input/keyboard/adp5589-keys.c
··· 235 235 unsigned short gpimapsize; 236 236 unsigned extend_cfg; 237 237 bool is_adp5585; 238 - bool adp5585_support_row5; 238 + bool support_row5; 239 239 #ifdef CONFIG_GPIOLIB 240 240 unsigned char gpiomap[ADP5589_MAXGPIO]; 241 241 bool export_gpio; ··· 485 485 if (kpad->extend_cfg & C4_EXTEND_CFG) 486 486 pin_used[kpad->var->c4_extend_cfg] = true; 487 487 488 - if (!kpad->adp5585_support_row5) 488 + if (!kpad->support_row5) 489 489 pin_used[5] = true; 490 490 491 491 for (i = 0; i < kpad->var->maxgpio; i++) ··· 884 884 885 885 switch (id->driver_data) { 886 886 case ADP5585_02: 887 - kpad->adp5585_support_row5 = true; 887 + kpad->support_row5 = true; 888 888 case ADP5585_01: 889 889 kpad->is_adp5585 = true; 890 890 kpad->var = &const_adp5585; 891 891 break; 892 892 case ADP5589: 893 + kpad->support_row5 = true; 893 894 kpad->var = &const_adp5589; 894 895 break; 895 896 }
+6 -2
drivers/input/keyboard/cap11xx.c
··· 304 304 led->cdev.brightness = LED_OFF; 305 305 306 306 error = of_property_read_u32(child, "reg", &reg); 307 - if (error != 0 || reg >= num_leds) 307 + if (error != 0 || reg >= num_leds) { 308 + of_node_put(child); 308 309 return -EINVAL; 310 + } 309 311 310 312 led->reg = reg; 311 313 led->priv = priv; ··· 315 313 INIT_WORK(&led->work, cap11xx_led_work); 316 314 317 315 error = devm_led_classdev_register(dev, &led->cdev); 318 - if (error) 316 + if (error) { 317 + of_node_put(child); 319 318 return error; 319 + } 320 320 321 321 priv->num_leds++; 322 322 led++;
+1 -1
drivers/input/misc/Kconfig
··· 733 733 module will be called xen-kbdfront. 734 734 735 735 config INPUT_SIRFSOC_ONKEY 736 - bool "CSR SiRFSoC power on/off/suspend key support" 736 + tristate "CSR SiRFSoC power on/off/suspend key support" 737 737 depends on ARCH_SIRF && OF 738 738 default y 739 739 help
+1 -1
drivers/input/misc/sirfsoc-onkey.c
··· 101 101 static const struct of_device_id sirfsoc_pwrc_of_match[] = { 102 102 { .compatible = "sirf,prima2-pwrc" }, 103 103 {}, 104 - } 104 + }; 105 105 MODULE_DEVICE_TABLE(of, sirfsoc_pwrc_of_match); 106 106 107 107 static int sirfsoc_pwrc_probe(struct platform_device *pdev)
+7 -6
drivers/input/mouse/vmmouse.c
··· 458 458 priv->abs_dev = abs_dev; 459 459 psmouse->private = priv; 460 460 461 - input_set_capability(rel_dev, EV_REL, REL_WHEEL); 462 - 463 461 /* Set up and register absolute device */ 464 462 snprintf(priv->phys, sizeof(priv->phys), "%s/input1", 465 463 psmouse->ps2dev.serio->phys); ··· 473 475 abs_dev->id.version = psmouse->model; 474 476 abs_dev->dev.parent = &psmouse->ps2dev.serio->dev; 475 477 476 - error = input_register_device(priv->abs_dev); 477 - if (error) 478 - goto init_fail; 479 - 480 478 /* Set absolute device capabilities */ 481 479 input_set_capability(abs_dev, EV_KEY, BTN_LEFT); 482 480 input_set_capability(abs_dev, EV_KEY, BTN_RIGHT); ··· 481 487 input_set_capability(abs_dev, EV_ABS, ABS_Y); 482 488 input_set_abs_params(abs_dev, ABS_X, 0, VMMOUSE_MAX_X, 0, 0); 483 489 input_set_abs_params(abs_dev, ABS_Y, 0, VMMOUSE_MAX_Y, 0, 0); 490 + 491 + error = input_register_device(priv->abs_dev); 492 + if (error) 493 + goto init_fail; 494 + 495 + /* Add wheel capability to the relative device */ 496 + input_set_capability(rel_dev, EV_REL, REL_WHEEL); 484 497 485 498 psmouse->protocol_handler = vmmouse_process_byte; 486 499 psmouse->disconnect = vmmouse_disconnect;
+1 -1
drivers/input/serio/serio.c
··· 134 134 int error; 135 135 136 136 error = device_attach(&serio->dev); 137 - if (error < 0) 137 + if (error < 0 && error != -EPROBE_DEFER) 138 138 dev_warn(&serio->dev, 139 139 "device_attach() failed for %s (%s), error: %d\n", 140 140 serio->phys, serio->name, error);
+1
drivers/input/touchscreen/colibri-vf50-ts.c
··· 21 21 #include <linux/interrupt.h> 22 22 #include <linux/kernel.h> 23 23 #include <linux/module.h> 24 + #include <linux/of.h> 24 25 #include <linux/pinctrl/consumer.h> 25 26 #include <linux/platform_device.h> 26 27 #include <linux/slab.h>
+12 -6
drivers/input/touchscreen/edt-ft5x06.c
··· 822 822 int error; 823 823 824 824 error = device_property_read_u32(dev, "threshold", &val); 825 - if (!error) 826 - reg_addr->reg_threshold = val; 825 + if (!error) { 826 + edt_ft5x06_register_write(tsdata, reg_addr->reg_threshold, val); 827 + tsdata->threshold = val; 828 + } 827 829 828 830 error = device_property_read_u32(dev, "gain", &val); 829 - if (!error) 830 - reg_addr->reg_gain = val; 831 + if (!error) { 832 + edt_ft5x06_register_write(tsdata, reg_addr->reg_gain, val); 833 + tsdata->gain = val; 834 + } 831 835 832 836 error = device_property_read_u32(dev, "offset", &val); 833 - if (!error) 834 - reg_addr->reg_offset = val; 837 + if (!error) { 838 + edt_ft5x06_register_write(tsdata, reg_addr->reg_offset, val); 839 + tsdata->offset = val; 840 + } 835 841 } 836 842 837 843 static void