Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elantech - touchpad driver miss-recognising logitech mice Input: synaptics - ensure we reset the device on resume Input: usbtouchscreen - fix eGalax HID ignoring Input: ambakmi - fix timeout handling in amba_kmi_write() Input: pxa930_trkball - fix write timeout handling Input: struct device - replace bus_id with dev_name(), dev_set_name() Input: bf54x-keys - fix debounce time validation Input: spitzkbd - mark probe function as __devinit Input: omap-keypad - mark probe function as __devinit Input: corgi_ts - mark probe function as __devinit Input: corgikbd - mark probe function as __devinit Input: uvc - the button on the camera is KEY_CAMERA Input: psmouse - make MOUSE_PS2_LIFEBOOK depend on X86 Input: atkbd - make forced_release_keys[] static Input: usbtouchscreen - allow reporting calibrated data
This commit is contained in:
@@ -70,7 +70,7 @@ config MOUSE_PS2_SYNAPTICS
|
||||
config MOUSE_PS2_LIFEBOOK
|
||||
bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EMBEDDED
|
||||
default y
|
||||
depends on MOUSE_PS2
|
||||
depends on MOUSE_PS2 && X86
|
||||
help
|
||||
Say Y here if you have a Fujitsu B-series Lifebook PS/2
|
||||
TouchScreen connected to your system.
|
||||
|
@@ -542,7 +542,7 @@ int elantech_detect(struct psmouse *psmouse, int set_properties)
|
||||
ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
|
||||
ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
|
||||
ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) {
|
||||
pr_err("elantech.c: sending Elantech magic knock failed.\n");
|
||||
pr_debug("elantech.c: sending Elantech magic knock failed.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -551,8 +551,27 @@ int elantech_detect(struct psmouse *psmouse, int set_properties)
|
||||
* set of magic numbers
|
||||
*/
|
||||
if (param[0] != 0x3c || param[1] != 0x03 || param[2] != 0xc8) {
|
||||
pr_info("elantech.c: unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
|
||||
param[0], param[1], param[2]);
|
||||
pr_debug("elantech.c: "
|
||||
"unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
|
||||
param[0], param[1], param[2]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Query touchpad's firmware version and see if it reports known
|
||||
* value to avoid mis-detection. Logitech mice are known to respond
|
||||
* to Elantech magic knock and there might be more.
|
||||
*/
|
||||
if (synaptics_send_cmd(psmouse, ETP_FW_VERSION_QUERY, param)) {
|
||||
pr_debug("elantech.c: failed to query firmware version.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pr_debug("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n",
|
||||
param[0], param[1], param[2]);
|
||||
|
||||
if (param[0] == 0 || param[1] != 0) {
|
||||
pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -600,8 +619,7 @@ int elantech_init(struct psmouse *psmouse)
|
||||
int i, error;
|
||||
unsigned char param[3];
|
||||
|
||||
etd = kzalloc(sizeof(struct elantech_data), GFP_KERNEL);
|
||||
psmouse->private = etd;
|
||||
psmouse->private = etd = kzalloc(sizeof(struct elantech_data), GFP_KERNEL);
|
||||
if (!etd)
|
||||
return -1;
|
||||
|
||||
@@ -610,14 +628,12 @@ int elantech_init(struct psmouse *psmouse)
|
||||
etd->parity[i] = etd->parity[i & (i - 1)] ^ 1;
|
||||
|
||||
/*
|
||||
* Find out what version hardware this is
|
||||
* Do the version query again so we can store the result
|
||||
*/
|
||||
if (synaptics_send_cmd(psmouse, ETP_FW_VERSION_QUERY, param)) {
|
||||
pr_err("elantech.c: failed to query firmware version.\n");
|
||||
goto init_fail;
|
||||
}
|
||||
pr_info("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n",
|
||||
param[0], param[1], param[2]);
|
||||
etd->fw_version_maj = param[0];
|
||||
etd->fw_version_min = param[2];
|
||||
|
||||
|
@@ -83,7 +83,7 @@ static int write_tbcr(struct pxa930_trkball *trkball, int v)
|
||||
|
||||
__raw_writel(v, trkball->mmio_base + TBCR);
|
||||
|
||||
while (i--) {
|
||||
while (--i) {
|
||||
if (__raw_readl(trkball->mmio_base + TBCR) == v)
|
||||
break;
|
||||
msleep(1);
|
||||
|
@@ -182,11 +182,6 @@ static int synaptics_identify(struct psmouse *psmouse)
|
||||
|
||||
static int synaptics_query_hardware(struct psmouse *psmouse)
|
||||
{
|
||||
int retries = 0;
|
||||
|
||||
while ((retries++ < 3) && psmouse_reset(psmouse))
|
||||
/* empty */;
|
||||
|
||||
if (synaptics_identify(psmouse))
|
||||
return -1;
|
||||
if (synaptics_model_id(psmouse))
|
||||
@@ -582,6 +577,8 @@ static int synaptics_reconnect(struct psmouse *psmouse)
|
||||
struct synaptics_data *priv = psmouse->private;
|
||||
struct synaptics_data old_priv = *priv;
|
||||
|
||||
psmouse_reset(psmouse);
|
||||
|
||||
if (synaptics_detect(psmouse, 0))
|
||||
return -1;
|
||||
|
||||
@@ -640,6 +637,8 @@ int synaptics_init(struct psmouse *psmouse)
|
||||
if (!priv)
|
||||
return -1;
|
||||
|
||||
psmouse_reset(psmouse);
|
||||
|
||||
if (synaptics_query_hardware(psmouse)) {
|
||||
printk(KERN_ERR "Unable to query Synaptics hardware.\n");
|
||||
goto init_fail;
|
||||
|
Reference in New Issue
Block a user