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