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
This commit is contained in:
commit
6d90b4f99d
|
@ -22,7 +22,6 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/init.h>
|
||||
|
|
|
@ -1377,6 +1377,12 @@ static int xpad_init_input(struct usb_xpad *xpad)
|
|||
input_dev->name = xpad->name;
|
||||
input_dev->phys = xpad->phys;
|
||||
usb_to_input_id(xpad->udev, &input_dev->id);
|
||||
|
||||
if (xpad->xtype == XTYPE_XBOX360W) {
|
||||
/* x360w controllers and the receiver have different ids */
|
||||
input_dev->id.product = 0x02a1;
|
||||
}
|
||||
|
||||
input_dev->dev.parent = &xpad->intf->dev;
|
||||
|
||||
input_set_drvdata(input_dev, xpad);
|
||||
|
|
|
@ -136,7 +136,6 @@ static const struct i2c_device_id adxl34x_id[] = {
|
|||
|
||||
MODULE_DEVICE_TABLE(i2c, adxl34x_id);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id adxl34x_of_id[] = {
|
||||
/*
|
||||
* The ADXL346 is backward-compatible with the ADXL345. Differences are
|
||||
|
@ -153,13 +152,12 @@ static const struct of_device_id adxl34x_of_id[] = {
|
|||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, adxl34x_of_id);
|
||||
#endif
|
||||
|
||||
static struct i2c_driver adxl34x_driver = {
|
||||
.driver = {
|
||||
.name = "adxl34x",
|
||||
.pm = &adxl34x_i2c_pm,
|
||||
.of_match_table = of_match_ptr(adxl34x_of_id),
|
||||
.of_match_table = adxl34x_of_id,
|
||||
},
|
||||
.probe = adxl34x_i2c_probe,
|
||||
.remove = adxl34x_i2c_remove,
|
||||
|
|
|
@ -114,7 +114,7 @@ enum SS4_PACKET_ID {
|
|||
(_b[1] & 0x7F) \
|
||||
)
|
||||
|
||||
#define SS4_TS_Y_V2(_b) (s8)( \
|
||||
#define SS4_TS_Y_V2(_b) -(s8)( \
|
||||
((_b[3] & 0x01) << 7) | \
|
||||
(_b[2] & 0x7F) \
|
||||
)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* after soft reset, we should wait for 1 ms
|
||||
* before the device becomes operational
|
||||
*/
|
||||
#define SOFT_RESET_DELAY_MS 3
|
||||
#define SOFT_RESET_DELAY_US 3000
|
||||
/* and after hard reset, we should wait for max 500ms */
|
||||
#define HARD_RESET_DELAY_MS 500
|
||||
|
||||
|
@ -311,7 +311,7 @@ static int synaptics_i2c_reset_config(struct i2c_client *client)
|
|||
if (ret) {
|
||||
dev_err(&client->dev, "Unable to reset device\n");
|
||||
} else {
|
||||
msleep(SOFT_RESET_DELAY_MS);
|
||||
usleep_range(SOFT_RESET_DELAY_US, SOFT_RESET_DELAY_US + 100);
|
||||
ret = synaptics_i2c_config(client);
|
||||
if (ret)
|
||||
dev_err(&client->dev, "Unable to config device\n");
|
||||
|
|
|
@ -41,7 +41,8 @@ config RMI4_SMB
|
|||
|
||||
config RMI4_F03
|
||||
bool "RMI4 Function 03 (PS2 Guest)"
|
||||
depends on RMI4_CORE && SERIO
|
||||
depends on RMI4_CORE
|
||||
depends on SERIO=y || RMI4_CORE=SERIO
|
||||
help
|
||||
Say Y here if you want to add support for RMI4 function 03.
|
||||
|
||||
|
|
|
@ -211,6 +211,12 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "C15B"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -914,9 +914,9 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev)
|
|||
|
||||
case QUEUE_HEADER_NORMAL:
|
||||
report_count = ts->buf[FW_HDR_COUNT];
|
||||
if (report_count > 3) {
|
||||
if (report_count == 0 || report_count > 3) {
|
||||
dev_err(&client->dev,
|
||||
"too large report count: %*ph\n",
|
||||
"bad report count: %*ph\n",
|
||||
HEADER_SIZE, ts->buf);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue