diff options
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/keyboard/imx_keypad.c | 3 | ||||
| -rw-r--r-- | drivers/input/misc/ab8500-ponkey.c | 4 | ||||
| -rw-r--r-- | drivers/input/mouse/sentelic.c | 11 | ||||
| -rw-r--r-- | drivers/input/serio/ambakmi.c | 6 | ||||
| -rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 20 | ||||
| -rw-r--r-- | drivers/input/tablet/wacom_wac.c | 6 | ||||
| -rw-r--r-- | drivers/input/touchscreen/edt-ft5x06.c | 11 | ||||
| -rw-r--r-- | drivers/input/touchscreen/eeti_ts.c | 21 | ||||
| -rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 40 | 
9 files changed, 104 insertions, 18 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index ff4c0a87a25..cdc252612c0 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -358,6 +358,7 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad)  	/* Inhibit KDI and KRI interrupts. */  	reg_val = readw(keypad->mmio_base + KPSR);  	reg_val &= ~(KBD_STAT_KRIE | KBD_STAT_KDIE); +	reg_val |= KBD_STAT_KPKR | KBD_STAT_KPKD;  	writew(reg_val, keypad->mmio_base + KPSR);  	/* Colums as open drain and disable all rows */ @@ -515,7 +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_prepare_enable(keypad->clk);  	imx_keypad_inhibit(keypad); +	clk_disable_unprepare(keypad->clk);  	error = request_irq(irq, imx_keypad_irq_handler, 0,  			    pdev->name, keypad); diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index f06231b7cab..84ec691c05a 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c @@ -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; diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index 3f5649f1908..a261d857691 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c @@ -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); diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 2ffd110bd5b..2e77246c2e5 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c @@ -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, diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 5ec774d6c82..d6cc77a53c7 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -177,6 +177,20 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {  		},  	},  	{ +		/* Gigabyte T1005 - defines wrong chassis type ("Other") */ +		.matches = { +			DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), +			DMI_MATCH(DMI_PRODUCT_NAME, "T1005"), +		}, +	}, +	{ +		/* Gigabyte T1005M/P - defines wrong chassis type ("Other") */ +		.matches = { +			DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), +			DMI_MATCH(DMI_PRODUCT_NAME, "T1005M/P"), +		}, +	}, +	{  		.matches = {  			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),  			DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), @@ -321,6 +335,12 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {  	},  	{  		.matches = { +			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), +			DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"), +		}, +	}, +	{ +		.matches = {  			DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"),  			DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"),  		}, diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 002041975de..532d067a9e0 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1848,7 +1848,10 @@ static const struct wacom_features wacom_features_0x2A =  	{ "Wacom Intuos5 M", WACOM_PKGLEN_INTUOS,  44704, 27940, 2047,  	  63, INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };  static const struct wacom_features wacom_features_0xF4 = -	{ "Wacom Cintiq 24HD",    WACOM_PKGLEN_INTUOS,   104480, 65600, 2047, +	{ "Wacom Cintiq 24HD",       WACOM_PKGLEN_INTUOS,   104480, 65600, 2047, +	  63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; +static const struct wacom_features wacom_features_0xF8 = +	{ "Wacom Cintiq 24HD touch", WACOM_PKGLEN_INTUOS,   104480, 65600, 2047,  	  63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };  static const struct wacom_features wacom_features_0x3F =  	{ "Wacom Cintiq 21UX",    WACOM_PKGLEN_INTUOS,    87200, 65600, 1023, @@ -2091,6 +2094,7 @@ const struct usb_device_id wacom_ids[] = {  	{ USB_DEVICE_WACOM(0xEF) },  	{ USB_DEVICE_WACOM(0x47) },  	{ USB_DEVICE_WACOM(0xF4) }, +	{ USB_DEVICE_WACOM(0xF8) },  	{ USB_DEVICE_WACOM(0xFA) },  	{ USB_DEVICE_LENOVO(0x6004) },  	{ } diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 9afc777a40a..64957770b52 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -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; @@ -602,6 +605,7 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata)  {  	if (tsdata->debug_dir)  		debugfs_remove_recursive(tsdata->debug_dir); +	kfree(tsdata->raw_buffer);  }  #else @@ -843,7 +847,6 @@ static int __devexit edt_ft5x06_ts_remove(struct i2c_client *client)  	if (gpio_is_valid(pdata->reset_pin))  		gpio_free(pdata->reset_pin); -	kfree(tsdata->raw_buffer);  	kfree(tsdata);  	return 0; diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 503c7096ed3..908407efc67 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c @@ -48,7 +48,7 @@ struct eeti_ts_priv {  	struct input_dev *input;  	struct work_struct work;  	struct mutex mutex; -	int irq, irq_active_high; +	int irq_gpio, irq, irq_active_high;  };  #define EETI_TS_BITDEPTH	(11) @@ -62,7 +62,7 @@ struct eeti_ts_priv {  static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)  { -	return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high; +	return gpio_get_value(priv->irq_gpio) == priv->irq_active_high;  }  static void eeti_ts_read(struct work_struct *work) @@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)  static int __devinit eeti_ts_probe(struct i2c_client *client,  				   const struct i2c_device_id *idp)  { -	struct eeti_ts_platform_data *pdata; +	struct eeti_ts_platform_data *pdata = client->dev.platform_data;  	struct eeti_ts_priv *priv;  	struct input_dev *input;  	unsigned int irq_flags; @@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,  	priv->client = client;  	priv->input = input; -	priv->irq = client->irq; +	priv->irq_gpio = pdata->irq_gpio; +	priv->irq = gpio_to_irq(pdata->irq_gpio); -	pdata = client->dev.platform_data; +	err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name); +	if (err < 0) +		goto err1;  	if (pdata)  		priv->irq_active_high = pdata->irq_active_high; @@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,  	err = input_register_device(input);  	if (err) -		goto err1; +		goto err2;  	err = request_irq(priv->irq, eeti_ts_isr, irq_flags,  			  client->name, priv);  	if (err) {  		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n"); -		goto err2; +		goto err3;  	}  	/* @@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,  	device_init_wakeup(&client->dev, 0);  	return 0; -err2: +err3:  	input_unregister_device(input);  	input = NULL; /* so we dont try to free it below */ +err2: +	gpio_free(pdata->irq_gpio);  err1:  	input_free_device(input);  	kfree(priv); diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index e32709e0dd6..721fdb3597c 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -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  |