#2598 BLOC Trial-2: Need to handle odd ESD touchpad reset case.
Zarro Boogs per Child
bugtracker at laptop.org
Tue Jul 31 16:36:24 EDT 2007
#2598: Need to handle odd ESD touchpad reset case.
----------------------+-----------------------------------------------------
Reporter: warp | Owner: cjb
Type: defect | Status: new
Priority: blocker | Milestone: Trial-2
Component: kernel | Version:
Resolution: | Keywords:
Verified: 0 |
----------------------+-----------------------------------------------------
Comment (by cjb):
Looks like Zephaniah offered an updated patch on IRC:
{{{
iff --git a/drivers/input/mouse/olpc.c b/drivers/input/mouse/olpc.c
index 777b969..66c1b3c 100644
--- a/drivers/input/mouse/olpc.c
+++ b/drivers/input/mouse/olpc.c
@@ -358,6 +358,10 @@ static int olpc_reconnect(struct psmouse *psmouse)
struct olpc_data *priv = psmouse->private;
int mode;
+ if (olpc_rev_after(OLPC_REV_B2))
+ if (psmouse->ps2dev.serio->dev.power_state.event !=
PM_EVENT_ON)
+ return 0;
+
psmouse_reset(psmouse);
if (!(priv->i = olpc_get_model(psmouse)))
@@ -375,11 +379,6 @@ static int olpc_reconnect(struct psmouse *psmouse)
return 0;
}
-static int olpc_noop(struct psmouse *psmouse)
-{
- return 0;
-}
-
static void olpc_disconnect(struct psmouse *psmouse)
{
struct olpc_data *priv = psmouse->private;
@@ -521,10 +520,7 @@ int olpc_init(struct psmouse *psmouse)
psmouse->protocol_handler = olpc_process_byte;
psmouse->poll = olpc_poll;
psmouse->disconnect = olpc_disconnect;
- if (olpc_rev_after(OLPC_REV_B2))
- psmouse->reconnect = olpc_noop;
- else
- psmouse->reconnect = olpc_reconnect;
+ psmouse->reconnect = olpc_reconnect;
psmouse->pktsize = 6;
/* Disable the idle resync. */
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse
/psmouse-base.c
index 276f369..aa4cfad 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -312,7 +312,7 @@ static irqreturn_t psmouse_interrupt(struct serio
*serio,
goto out;
}
- if (psmouse->packet[1] == PSMOUSE_RET_ID) {
+ if (psmouse->packet[1] == PSMOUSE_RET_ID ||
psmouse->packet[1] == PSMOUSE_RET_BAT) {
__psmouse_set_state(psmouse, PSMOUSE_IGNORE);
serio_reconnect(serio);
goto out;
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/2598#comment:3>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list