提交 6551d6fe 编写于 作者: 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:
 "Updates for the input subsystem.  Just a few driver updates mostly
  dealing with recent regressions."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: edt-ft5x06 - return -EFAULT on copy_to_user() error
  Input: sentelic - filter out erratic movement when lifting finger
  Input: ambakmi - [un]prepare clocks when enabling amd disabling
  Input: i8042 - disable mux on Toshiba C850D
  Revert "input: ab8500-ponkey: Create AB8500 domain IRQ mapping"
  Input: imx_keypad - fix missing clk conversions
  Input: usbtouchscreen - initialize eGalax devices
......@@ -516,9 +516,9 @@ static int __devinit imx_keypad_probe(struct platform_device *pdev)
input_set_drvdata(input_dev, keypad);
/* Ensure that the keypad will stay dormant until opened */
clk_enable(keypad->clk);
clk_prepare_enable(keypad->clk);
imx_keypad_inhibit(keypad);
clk_disable(keypad->clk);
clk_disable_unprepare(keypad->clk);
error = request_irq(irq, imx_keypad_irq_handler, 0,
pdev->name, keypad);
......
......@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
ponkey->idev = input;
ponkey->ab8500 = ab8500;
ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
ponkey->irq_dbf = irq_dbf;
ponkey->irq_dbr = irq_dbr;
input->name = "AB8500 POn(PowerOn) Key";
input->dev.parent = &pdev->dev;
......
......@@ -721,6 +721,17 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
switch (psmouse->packet[0] >> FSP_PKT_TYPE_SHIFT) {
case FSP_PKT_TYPE_ABS:
if ((packet[0] == 0x48 || packet[0] == 0x49) &&
packet[1] == 0 && packet[2] == 0) {
/*
* Ignore coordinate noise when finger leaving the
* surface, otherwise cursor may jump to upper-left
* corner.
*/
packet[3] &= 0xf0;
}
abs_x = GET_ABS_X(packet);
abs_y = GET_ABS_Y(packet);
......
......@@ -72,7 +72,7 @@ static int amba_kmi_open(struct serio *io)
unsigned int divisor;
int ret;
ret = clk_enable(kmi->clk);
ret = clk_prepare_enable(kmi->clk);
if (ret)
goto out;
......@@ -92,7 +92,7 @@ static int amba_kmi_open(struct serio *io)
return 0;
clk_disable:
clk_disable(kmi->clk);
clk_disable_unprepare(kmi->clk);
out:
return ret;
}
......@@ -104,7 +104,7 @@ static void amba_kmi_close(struct serio *io)
writeb(0, KMICR);
free_irq(kmi->irq, kmi);
clk_disable(kmi->clk);
clk_disable_unprepare(kmi->clk);
}
static int __devinit amba_kmi_probe(struct amba_device *dev,
......
......@@ -333,6 +333,12 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"),
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"),
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"),
......
......@@ -566,9 +566,12 @@ static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file,
}
read = min_t(size_t, count, tsdata->raw_bufsize - *off);
error = copy_to_user(buf, tsdata->raw_buffer + *off, read);
if (!error)
*off += read;
if (copy_to_user(buf, tsdata->raw_buffer + *off, read)) {
error = -EFAULT;
goto out;
}
*off += read;
out:
mutex_unlock(&tsdata->mutex);
return error ?: read;
......
......@@ -304,6 +304,45 @@ static int e2i_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
#define EGALAX_PKT_TYPE_REPT 0x80
#define EGALAX_PKT_TYPE_DIAG 0x0A
static int egalax_init(struct usbtouch_usb *usbtouch)
{
int ret, i;
unsigned char *buf;
struct usb_device *udev = interface_to_usbdev(usbtouch->interface);
/*
* An eGalax diagnostic packet kicks the device into using the right
* protocol. We send a "check active" packet. The response will be
* read later and ignored.
*/
buf = kmalloc(3, GFP_KERNEL);
if (!buf)
return -ENOMEM;
buf[0] = EGALAX_PKT_TYPE_DIAG;
buf[1] = 1; /* length */
buf[2] = 'A'; /* command - check active */
for (i = 0; i < 3; i++) {
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
0,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0, 0, buf, 3,
USB_CTRL_SET_TIMEOUT);
if (ret >= 0) {
ret = 0;
break;
}
if (ret != -EPIPE)
break;
}
kfree(buf);
return ret;
}
static int egalax_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
if ((pkt[0] & EGALAX_PKT_TYPE_MASK) != EGALAX_PKT_TYPE_REPT)
......@@ -1056,6 +1095,7 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.process_pkt = usbtouch_process_multi,
.get_pkt_len = egalax_get_pkt_len,
.read_data = egalax_read_data,
.init = egalax_init,
},
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册