提交 4abb663b 编写于 作者: L Linus Torvalds

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

Pull input updates from Dmitry Torokhov:
 "Just a few small fixes..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: da9052 - fix memory leak in da9052_onkey_probe()
  Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h
  Input: trackpoint - use psmouse_fmt() for messages
  Input: elantech - v4 is a clickpad, with only one button
  Input: elantech - reset touchpad before configuring it
  Input: sentelic - filter taps in absolute mode
  Input: tps6507x-ts - fix MODULE_ALIAS to match driver name
......@@ -95,7 +95,8 @@ static int __devinit da9052_onkey_probe(struct platform_device *pdev)
input_dev = input_allocate_device();
if (!onkey || !input_dev) {
dev_err(&pdev->dev, "Failed to allocate memory\n");
return -ENOMEM;
error = -ENOMEM;
goto err_free_mem;
}
onkey->input = input_dev;
......
......@@ -486,7 +486,6 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
unsigned char *packet = psmouse->packet;
input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
input_mt_report_pointer_emulation(dev, true);
input_sync(dev);
}
......@@ -967,6 +966,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
if (elantech_set_range(psmouse, &x_min, &y_min, &x_max, &y_max, &width))
return -1;
__set_bit(INPUT_PROP_POINTER, dev->propbit);
__set_bit(EV_KEY, dev->evbit);
__set_bit(EV_ABS, dev->evbit);
__clear_bit(EV_REL, dev->evbit);
......@@ -1017,7 +1017,9 @@ static int elantech_set_input_params(struct psmouse *psmouse)
*/
psmouse_warn(psmouse, "couldn't query resolution data.\n");
}
/* v4 is clickpad, with only one button. */
__set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
__clear_bit(BTN_RIGHT, dev->keybit);
__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
/* For X to recognize me as touchpad. */
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
......@@ -1245,6 +1247,8 @@ static void elantech_disconnect(struct psmouse *psmouse)
*/
static int elantech_reconnect(struct psmouse *psmouse)
{
psmouse_reset(psmouse);
if (elantech_detect(psmouse, 0))
return -1;
......@@ -1324,6 +1328,8 @@ int elantech_init(struct psmouse *psmouse)
if (!etd)
return -ENOMEM;
psmouse_reset(psmouse);
etd->parity[0] = 1;
for (i = 1; i < 256; i++)
etd->parity[i] = etd->parity[i & (i - 1)] ^ 1;
......
......@@ -12,9 +12,9 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/input-polldev.h>
#include <linux/gpio.h>
#include <linux/gpio_mouse.h>
#include <asm/gpio.h>
/*
* Timer function which is run every scan_ms ms when the device is opened.
......
......@@ -741,6 +741,14 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
}
} else {
/* SFAC packet */
if ((packet[0] & (FSP_PB0_LBTN|FSP_PB0_PHY_BTN)) ==
FSP_PB0_LBTN) {
/* On-pad click in SFAC mode should be handled
* by userspace. On-pad clicks in MFMC mode
* are real clickpad clicks, and not ignored.
*/
packet[0] &= ~FSP_PB0_LBTN;
}
/* no multi-finger information */
ad->last_mt_fgr = 0;
......
......@@ -304,7 +304,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
return 0;
if (trackpoint_read(&psmouse->ps2dev, TP_EXT_BTN, &button_info)) {
printk(KERN_WARNING "trackpoint.c: failed to get extended button data\n");
psmouse_warn(psmouse, "failed to get extended button data\n");
button_info = 0;
}
......@@ -326,16 +326,18 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
error = sysfs_create_group(&ps2dev->serio->dev.kobj, &trackpoint_attr_group);
if (error) {
printk(KERN_ERR
"trackpoint.c: failed to create sysfs attributes, error: %d\n",
error);
psmouse_err(psmouse,
"failed to create sysfs attributes, error: %d\n",
error);
kfree(psmouse->private);
psmouse->private = NULL;
return -1;
}
printk(KERN_INFO "IBM TrackPoint firmware: 0x%02x, buttons: %d/%d\n",
firmware_id, (button_info & 0xf0) >> 4, button_info & 0x0f);
psmouse_info(psmouse,
"IBM TrackPoint firmware: 0x%02x, buttons: %d/%d\n",
firmware_id,
(button_info & 0xf0) >> 4, button_info & 0x0f);
return 0;
}
......
/*
* drivers/input/touchscreen/tps6507x_ts.c
*
* Touchscreen driver for the tps6507x chip.
*
* Copyright (c) 2009 RidgeRun (todd.fischer@ridgerun.com)
......@@ -376,4 +374,4 @@ module_platform_driver(tps6507x_ts_driver);
MODULE_AUTHOR("Todd Fischer <todd.fischer@ridgerun.com>");
MODULE_DESCRIPTION("TPS6507x - TouchScreen driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:tps6507x-tsc");
MODULE_ALIAS("platform:tps6507x-ts");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册