Re: [PATCH] Synaptics: support for pass-through port (stick)

Peter Berg Larsen (pebl@math.ku.dk)
Mon, 7 Jul 2003 13:44:26 +0200 (CEST)


On Sun, 6 Jul 2003, Dmitry Torokhov wrote:
> On Sunday 06 July 2003 08:23 am, Peter Berg Larsen wrote:

> > Why did you move the rescan up above the synaptics test? if the synaptics
> > is out of sync, any byte can be recieved.

> Yes, any byte can be received but it is unlikely that we will receive 0xAA.

Are you sure that it is unlikely for all type >= PSMOUSE_GENPS? How about
looking for the 0x00 also.

> + if (psmouse->pktcnt == 1 && psmouse->packet[0] == PSMOUSE_RET_BAT) {
...
> + if (psmouse->type == PSMOUSE_SYNAPTICS) {
...
> + if (psmouse->pktcnt == 3 + (psmouse->type >= PSMOUSE_GENPS)) {

> the device gets reset. (What happens on resume for example? I am not sure as
> I didn't get to play with suspending/resuming my laptop yet.)

The mode byte is cleared to default.

> What you think about the patch below? I fixed the client's protocol order,
> ... and switching to 4-byte protocol for master.

ok.

> button reporting (only left and right as I am not sure to which buttons
> up/down should be mapped),

hmm. You dont know what the guest protocol, so you can't just | the
button information. However, reallity is that this will work for nearly
anybody now.

> + /* adjust the touchpad to child's choice of protocol */
> + child = port->private;
> + if (child && child->type >= PSMOUSE_GENPS) {

Not type > PSMOUSE_GENPS ?

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/