aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/xpad.c1
-rw-r--r--drivers/input/keyboard/adp5589-keys.c7
-rw-r--r--drivers/input/keyboard/cap11xx.c8
-rw-r--r--drivers/input/misc/Kconfig2
-rw-r--r--drivers/input/misc/sirfsoc-onkey.c2
-rw-r--r--drivers/input/mouse/vmmouse.c13
-rw-r--r--drivers/input/serio/serio.c2
-rw-r--r--drivers/input/touchscreen/colibri-vf50-ts.c1
-rw-r--r--drivers/input/touchscreen/edt-ft5x06.c18
9 files changed, 33 insertions, 21 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6727954ab74b..e8a84d12b7ff 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1207,7 +1207,6 @@ static void xpad_led_disconnect(struct usb_xpad *xpad)
1207#else 1207#else
1208static int xpad_led_probe(struct usb_xpad *xpad) { return 0; } 1208static int xpad_led_probe(struct usb_xpad *xpad) { return 0; }
1209static void xpad_led_disconnect(struct usb_xpad *xpad) { } 1209static void xpad_led_disconnect(struct usb_xpad *xpad) { }
1210static void xpad_identify_controller(struct usb_xpad *xpad) { }
1211#endif 1210#endif
1212 1211
1213static int xpad_start_input(struct usb_xpad *xpad) 1212static int xpad_start_input(struct usb_xpad *xpad)
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 4d446d5085aa..c01a1d648f9f 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -235,7 +235,7 @@ struct adp5589_kpad {
235 unsigned short gpimapsize; 235 unsigned short gpimapsize;
236 unsigned extend_cfg; 236 unsigned extend_cfg;
237 bool is_adp5585; 237 bool is_adp5585;
238 bool adp5585_support_row5; 238 bool support_row5;
239#ifdef CONFIG_GPIOLIB 239#ifdef CONFIG_GPIOLIB
240 unsigned char gpiomap[ADP5589_MAXGPIO]; 240 unsigned char gpiomap[ADP5589_MAXGPIO];
241 bool export_gpio; 241 bool export_gpio;
@@ -485,7 +485,7 @@ static int adp5589_build_gpiomap(struct adp5589_kpad *kpad,
485 if (kpad->extend_cfg & C4_EXTEND_CFG) 485 if (kpad->extend_cfg & C4_EXTEND_CFG)
486 pin_used[kpad->var->c4_extend_cfg] = true; 486 pin_used[kpad->var->c4_extend_cfg] = true;
487 487
488 if (!kpad->adp5585_support_row5) 488 if (!kpad->support_row5)
489 pin_used[5] = true; 489 pin_used[5] = true;
490 490
491 for (i = 0; i < kpad->var->maxgpio; i++) 491 for (i = 0; i < kpad->var->maxgpio; i++)
@@ -884,12 +884,13 @@ static int adp5589_probe(struct i2c_client *client,
884 884
885 switch (id->driver_data) { 885 switch (id->driver_data) {
886 case ADP5585_02: 886 case ADP5585_02:
887 kpad->adp5585_support_row5 = true; 887 kpad->support_row5 = true;
888 case ADP5585_01: 888 case ADP5585_01:
889 kpad->is_adp5585 = true; 889 kpad->is_adp5585 = true;
890 kpad->var = &const_adp5585; 890 kpad->var = &const_adp5585;
891 break; 891 break;
892 case ADP5589: 892 case ADP5589:
893 kpad->support_row5 = true;
893 kpad->var = &const_adp5589; 894 kpad->var = &const_adp5589;
894 break; 895 break;
895 } 896 }
diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c
index 378db10001df..4401be225d64 100644
--- a/drivers/input/keyboard/cap11xx.c
+++ b/drivers/input/keyboard/cap11xx.c
@@ -304,8 +304,10 @@ static int cap11xx_init_leds(struct device *dev,
304 led->cdev.brightness = LED_OFF; 304 led->cdev.brightness = LED_OFF;
305 305
306 error = of_property_read_u32(child, "reg", &reg); 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 return -EINVAL; 309 return -EINVAL;
310 }
309 311
310 led->reg = reg; 312 led->reg = reg;
311 led->priv = priv; 313 led->priv = priv;
@@ -313,8 +315,10 @@ static int cap11xx_init_leds(struct device *dev,
313 INIT_WORK(&led->work, cap11xx_led_work); 315 INIT_WORK(&led->work, cap11xx_led_work);
314 316
315 error = devm_led_classdev_register(dev, &led->cdev); 317 error = devm_led_classdev_register(dev, &led->cdev);
316 if (error) 318 if (error) {
319 of_node_put(child);
317 return error; 320 return error;
321 }
318 322
319 priv->num_leds++; 323 priv->num_leds++;
320 led++; 324 led++;
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index d6d16fa78281..1f2337abcf2f 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -733,7 +733,7 @@ config INPUT_XEN_KBDDEV_FRONTEND
733 module will be called xen-kbdfront. 733 module will be called xen-kbdfront.
734 734
735config INPUT_SIRFSOC_ONKEY 735config INPUT_SIRFSOC_ONKEY
736 bool "CSR SiRFSoC power on/off/suspend key support" 736 tristate "CSR SiRFSoC power on/off/suspend key support"
737 depends on ARCH_SIRF && OF 737 depends on ARCH_SIRF && OF
738 default y 738 default y
739 help 739 help
diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c
index 9d5b89befe6f..ed7237f19539 100644
--- a/drivers/input/misc/sirfsoc-onkey.c
+++ b/drivers/input/misc/sirfsoc-onkey.c
@@ -101,7 +101,7 @@ static void sirfsoc_pwrc_close(struct input_dev *input)
101static const struct of_device_id sirfsoc_pwrc_of_match[] = { 101static const struct of_device_id sirfsoc_pwrc_of_match[] = {
102 { .compatible = "sirf,prima2-pwrc" }, 102 { .compatible = "sirf,prima2-pwrc" },
103 {}, 103 {},
104} 104};
105MODULE_DEVICE_TABLE(of, sirfsoc_pwrc_of_match); 105MODULE_DEVICE_TABLE(of, sirfsoc_pwrc_of_match);
106 106
107static int sirfsoc_pwrc_probe(struct platform_device *pdev) 107static int sirfsoc_pwrc_probe(struct platform_device *pdev)
diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c
index e272f06258ce..a3f0f5a47490 100644
--- a/drivers/input/mouse/vmmouse.c
+++ b/drivers/input/mouse/vmmouse.c
@@ -458,8 +458,6 @@ int vmmouse_init(struct psmouse *psmouse)
458 priv->abs_dev = abs_dev; 458 priv->abs_dev = abs_dev;
459 psmouse->private = priv; 459 psmouse->private = priv;
460 460
461 input_set_capability(rel_dev, EV_REL, REL_WHEEL);
462
463 /* Set up and register absolute device */ 461 /* Set up and register absolute device */
464 snprintf(priv->phys, sizeof(priv->phys), "%s/input1", 462 snprintf(priv->phys, sizeof(priv->phys), "%s/input1",
465 psmouse->ps2dev.serio->phys); 463 psmouse->ps2dev.serio->phys);
@@ -475,10 +473,6 @@ int vmmouse_init(struct psmouse *psmouse)
475 abs_dev->id.version = psmouse->model; 473 abs_dev->id.version = psmouse->model;
476 abs_dev->dev.parent = &psmouse->ps2dev.serio->dev; 474 abs_dev->dev.parent = &psmouse->ps2dev.serio->dev;
477 475
478 error = input_register_device(priv->abs_dev);
479 if (error)
480 goto init_fail;
481
482 /* Set absolute device capabilities */ 476 /* Set absolute device capabilities */
483 input_set_capability(abs_dev, EV_KEY, BTN_LEFT); 477 input_set_capability(abs_dev, EV_KEY, BTN_LEFT);
484 input_set_capability(abs_dev, EV_KEY, BTN_RIGHT); 478 input_set_capability(abs_dev, EV_KEY, BTN_RIGHT);
@@ -488,6 +482,13 @@ int vmmouse_init(struct psmouse *psmouse)
488 input_set_abs_params(abs_dev, ABS_X, 0, VMMOUSE_MAX_X, 0, 0); 482 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); 483 input_set_abs_params(abs_dev, ABS_Y, 0, VMMOUSE_MAX_Y, 0, 0);
490 484
485 error = input_register_device(priv->abs_dev);
486 if (error)
487 goto init_fail;
488
489 /* Add wheel capability to the relative device */
490 input_set_capability(rel_dev, EV_REL, REL_WHEEL);
491
491 psmouse->protocol_handler = vmmouse_process_byte; 492 psmouse->protocol_handler = vmmouse_process_byte;
492 psmouse->disconnect = vmmouse_disconnect; 493 psmouse->disconnect = vmmouse_disconnect;
493 psmouse->reconnect = vmmouse_reconnect; 494 psmouse->reconnect = vmmouse_reconnect;
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 8f828975ab10..1ca7f551e2da 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -134,7 +134,7 @@ static void serio_find_driver(struct serio *serio)
134 int error; 134 int error;
135 135
136 error = device_attach(&serio->dev); 136 error = device_attach(&serio->dev);
137 if (error < 0) 137 if (error < 0 && error != -EPROBE_DEFER)
138 dev_warn(&serio->dev, 138 dev_warn(&serio->dev,
139 "device_attach() failed for %s (%s), error: %d\n", 139 "device_attach() failed for %s (%s), error: %d\n",
140 serio->phys, serio->name, error); 140 serio->phys, serio->name, error);
diff --git a/drivers/input/touchscreen/colibri-vf50-ts.c b/drivers/input/touchscreen/colibri-vf50-ts.c
index 5d4903a402cc..69828d015d45 100644
--- a/drivers/input/touchscreen/colibri-vf50-ts.c
+++ b/drivers/input/touchscreen/colibri-vf50-ts.c
@@ -21,6 +21,7 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/of.h>
24#include <linux/pinctrl/consumer.h> 25#include <linux/pinctrl/consumer.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
26#include <linux/slab.h> 27#include <linux/slab.h>
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 0b0f8c17f3f7..23fbe382da8b 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -822,16 +822,22 @@ static void edt_ft5x06_ts_get_defaults(struct device *dev,
822 int error; 822 int error;
823 823
824 error = device_property_read_u32(dev, "threshold", &val); 824 error = device_property_read_u32(dev, "threshold", &val);
825 if (!error) 825 if (!error) {
826 reg_addr->reg_threshold = val; 826 edt_ft5x06_register_write(tsdata, reg_addr->reg_threshold, val);
827 tsdata->threshold = val;
828 }
827 829
828 error = device_property_read_u32(dev, "gain", &val); 830 error = device_property_read_u32(dev, "gain", &val);
829 if (!error) 831 if (!error) {
830 reg_addr->reg_gain = val; 832 edt_ft5x06_register_write(tsdata, reg_addr->reg_gain, val);
833 tsdata->gain = val;
834 }
831 835
832 error = device_property_read_u32(dev, "offset", &val); 836 error = device_property_read_u32(dev, "offset", &val);
833 if (!error) 837 if (!error) {
834 reg_addr->reg_offset = val; 838 edt_ft5x06_register_write(tsdata, reg_addr->reg_offset, val);
839 tsdata->offset = val;
840 }
835} 841}
836 842
837static void 843static void