diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-13 14:49:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-13 14:49:34 -0500 |
commit | 6d90b4f99d62e6cf7643c7d8b48a9d7c005455bd (patch) | |
tree | cdf7b115c0e8bca8b89969119a48412a81a2548a | |
parent | 557ed56cc75e0a33c15ba438734a280bac23bd32 (diff) | |
parent | 1c3415a06b1016a596bfe59e0cfee56c773aa958 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
"Small driver fixups"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elants_i2c - avoid divide by 0 errors on bad touchscreen data
Input: adxl34x - make it enumerable in ACPI environment
Input: ALPS - fix TrackStick Y axis handling for SS5 hardware
Input: synaptics-rmi4 - fix F03 build error when serio is module
Input: xpad - use correct product id for x360w controllers
Input: synaptics_i2c - change msleep to usleep_range for small msecs
Input: i8042 - add Pegatron touchpad to noloop table
Input: joydev - remove unused linux/miscdevice.h include
-rw-r--r-- | drivers/input/joydev.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 6 | ||||
-rw-r--r-- | drivers/input/misc/adxl34x-i2c.c | 4 | ||||
-rw-r--r-- | drivers/input/mouse/alps.h | 2 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics_i2c.c | 4 | ||||
-rw-r--r-- | drivers/input/rmi4/Kconfig | 3 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 6 | ||||
-rw-r--r-- | drivers/input/touchscreen/elants_i2c.c | 4 |
8 files changed, 20 insertions, 10 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index f3135ae22df4..abd18f31b24f 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/miscdevice.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/poll.h> | 26 | #include <linux/poll.h> |
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6d9499658671..c7d5b2b643d1 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -1377,6 +1377,12 @@ static int xpad_init_input(struct usb_xpad *xpad) | |||
1377 | input_dev->name = xpad->name; | 1377 | input_dev->name = xpad->name; |
1378 | input_dev->phys = xpad->phys; | 1378 | input_dev->phys = xpad->phys; |
1379 | usb_to_input_id(xpad->udev, &input_dev->id); | 1379 | usb_to_input_id(xpad->udev, &input_dev->id); |
1380 | |||
1381 | if (xpad->xtype == XTYPE_XBOX360W) { | ||
1382 | /* x360w controllers and the receiver have different ids */ | ||
1383 | input_dev->id.product = 0x02a1; | ||
1384 | } | ||
1385 | |||
1380 | input_dev->dev.parent = &xpad->intf->dev; | 1386 | input_dev->dev.parent = &xpad->intf->dev; |
1381 | 1387 | ||
1382 | input_set_drvdata(input_dev, xpad); | 1388 | input_set_drvdata(input_dev, xpad); |
diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c index a8b0a2eec344..7fed92fb8cc1 100644 --- a/drivers/input/misc/adxl34x-i2c.c +++ b/drivers/input/misc/adxl34x-i2c.c | |||
@@ -136,7 +136,6 @@ static const struct i2c_device_id adxl34x_id[] = { | |||
136 | 136 | ||
137 | MODULE_DEVICE_TABLE(i2c, adxl34x_id); | 137 | MODULE_DEVICE_TABLE(i2c, adxl34x_id); |
138 | 138 | ||
139 | #ifdef CONFIG_OF | ||
140 | static const struct of_device_id adxl34x_of_id[] = { | 139 | static const struct of_device_id adxl34x_of_id[] = { |
141 | /* | 140 | /* |
142 | * The ADXL346 is backward-compatible with the ADXL345. Differences are | 141 | * The ADXL346 is backward-compatible with the ADXL345. Differences are |
@@ -153,13 +152,12 @@ static const struct of_device_id adxl34x_of_id[] = { | |||
153 | }; | 152 | }; |
154 | 153 | ||
155 | MODULE_DEVICE_TABLE(of, adxl34x_of_id); | 154 | MODULE_DEVICE_TABLE(of, adxl34x_of_id); |
156 | #endif | ||
157 | 155 | ||
158 | static struct i2c_driver adxl34x_driver = { | 156 | static struct i2c_driver adxl34x_driver = { |
159 | .driver = { | 157 | .driver = { |
160 | .name = "adxl34x", | 158 | .name = "adxl34x", |
161 | .pm = &adxl34x_i2c_pm, | 159 | .pm = &adxl34x_i2c_pm, |
162 | .of_match_table = of_match_ptr(adxl34x_of_id), | 160 | .of_match_table = adxl34x_of_id, |
163 | }, | 161 | }, |
164 | .probe = adxl34x_i2c_probe, | 162 | .probe = adxl34x_i2c_probe, |
165 | .remove = adxl34x_i2c_remove, | 163 | .remove = adxl34x_i2c_remove, |
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index cde6f4bd8ea2..6d279aa27cb9 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h | |||
@@ -114,7 +114,7 @@ enum SS4_PACKET_ID { | |||
114 | (_b[1] & 0x7F) \ | 114 | (_b[1] & 0x7F) \ |
115 | ) | 115 | ) |
116 | 116 | ||
117 | #define SS4_TS_Y_V2(_b) (s8)( \ | 117 | #define SS4_TS_Y_V2(_b) -(s8)( \ |
118 | ((_b[3] & 0x01) << 7) | \ | 118 | ((_b[3] & 0x01) << 7) | \ |
119 | (_b[2] & 0x7F) \ | 119 | (_b[2] & 0x7F) \ |
120 | ) | 120 | ) |
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index aa7c5da60800..cb2bf203f4ca 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * after soft reset, we should wait for 1 ms | 29 | * after soft reset, we should wait for 1 ms |
30 | * before the device becomes operational | 30 | * before the device becomes operational |
31 | */ | 31 | */ |
32 | #define SOFT_RESET_DELAY_MS 3 | 32 | #define SOFT_RESET_DELAY_US 3000 |
33 | /* and after hard reset, we should wait for max 500ms */ | 33 | /* and after hard reset, we should wait for max 500ms */ |
34 | #define HARD_RESET_DELAY_MS 500 | 34 | #define HARD_RESET_DELAY_MS 500 |
35 | 35 | ||
@@ -311,7 +311,7 @@ static int synaptics_i2c_reset_config(struct i2c_client *client) | |||
311 | if (ret) { | 311 | if (ret) { |
312 | dev_err(&client->dev, "Unable to reset device\n"); | 312 | dev_err(&client->dev, "Unable to reset device\n"); |
313 | } else { | 313 | } else { |
314 | msleep(SOFT_RESET_DELAY_MS); | 314 | usleep_range(SOFT_RESET_DELAY_US, SOFT_RESET_DELAY_US + 100); |
315 | ret = synaptics_i2c_config(client); | 315 | ret = synaptics_i2c_config(client); |
316 | if (ret) | 316 | if (ret) |
317 | dev_err(&client->dev, "Unable to config device\n"); | 317 | dev_err(&client->dev, "Unable to config device\n"); |
diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig index 30cc627a4f45..8993983e3fe4 100644 --- a/drivers/input/rmi4/Kconfig +++ b/drivers/input/rmi4/Kconfig | |||
@@ -41,7 +41,8 @@ config RMI4_SMB | |||
41 | 41 | ||
42 | config RMI4_F03 | 42 | config RMI4_F03 |
43 | bool "RMI4 Function 03 (PS2 Guest)" | 43 | bool "RMI4 Function 03 (PS2 Guest)" |
44 | depends on RMI4_CORE && SERIO | 44 | depends on RMI4_CORE |
45 | depends on SERIO=y || RMI4_CORE=SERIO | ||
45 | help | 46 | help |
46 | Say Y here if you want to add support for RMI4 function 03. | 47 | Say Y here if you want to add support for RMI4 function 03. |
47 | 48 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 77551f522202..a7618776705a 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -211,6 +211,12 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { | |||
211 | DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"), | 211 | DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"), |
212 | }, | 212 | }, |
213 | }, | 213 | }, |
214 | { | ||
215 | .matches = { | ||
216 | DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"), | ||
217 | DMI_MATCH(DMI_PRODUCT_NAME, "C15B"), | ||
218 | }, | ||
219 | }, | ||
214 | { } | 220 | { } |
215 | }; | 221 | }; |
216 | 222 | ||
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 02aec284deca..3e6003d32e56 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c | |||
@@ -914,9 +914,9 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev) | |||
914 | 914 | ||
915 | case QUEUE_HEADER_NORMAL: | 915 | case QUEUE_HEADER_NORMAL: |
916 | report_count = ts->buf[FW_HDR_COUNT]; | 916 | report_count = ts->buf[FW_HDR_COUNT]; |
917 | if (report_count > 3) { | 917 | if (report_count == 0 || report_count > 3) { |
918 | dev_err(&client->dev, | 918 | dev_err(&client->dev, |
919 | "too large report count: %*ph\n", | 919 | "bad report count: %*ph\n", |
920 | HEADER_SIZE, ts->buf); | 920 | HEADER_SIZE, ts->buf); |
921 | break; | 921 | break; |
922 | } | 922 | } |