Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Jan 14, 2006
2 parents 87530db + eab9edd commit e7de369
Show file tree
Hide file tree
Showing 12 changed files with 551 additions and 88 deletions.
38 changes: 38 additions & 0 deletions drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,40 @@ static int alps_tap_mode(struct psmouse *psmouse, int enable)
return 0;
}

/*
* alps_poll() - poll the touchpad for current motion packet.
* Used in resync.
*/
static int alps_poll(struct psmouse *psmouse)
{
struct alps_data *priv = psmouse->private;
unsigned char buf[6];
int poll_failed;

if (priv->i->flags & ALPS_PASS)
alps_passthrough_mode(psmouse, 1);

poll_failed = ps2_command(&psmouse->ps2dev, buf,
PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0;

if (priv->i->flags & ALPS_PASS)
alps_passthrough_mode(psmouse, 0);

if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0)
return -1;

if ((psmouse->badbyte & 0xc8) == 0x08) {
/*
* Poll the track stick ...
*/
if (ps2_command(&psmouse->ps2dev, buf, PSMOUSE_CMD_POLL | (3 << 8)))
return -1;
}

memcpy(psmouse->packet, buf, sizeof(buf));
return 0;
}

static int alps_reconnect(struct psmouse *psmouse)
{
struct alps_data *priv = psmouse->private;
Expand Down Expand Up @@ -451,10 +485,14 @@ int alps_init(struct psmouse *psmouse)
input_register_device(priv->dev2);

psmouse->protocol_handler = alps_process_byte;
psmouse->poll = alps_poll;
psmouse->disconnect = alps_disconnect;
psmouse->reconnect = alps_reconnect;
psmouse->pktsize = 6;

/* We are having trouble resyncing ALPS touchpads so disable it for now */
psmouse->resync_time = 0;

return 0;

init_fail:
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/mouse/logips2pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static int ps2pp_cmd(struct psmouse *psmouse, unsigned char *param, unsigned cha
if (psmouse_sliced_command(psmouse, command))
return -1;

if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_POLL))
if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_POLL | 0x0300))
return -1;

return 0;
Expand Down
Loading

0 comments on commit e7de369

Please sign in to comment.