Re: [PATCH 3/3] OLPC: touchpad driver (take 2)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andres Salomon
Date: Thursday, August 28, 2008 - 11:49 pm

Hi Dmitry,

Sorry, just now getting the chance to look at this...

On Thu, 14 Aug 2008 23:14:35 -0400
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:

[...]


Can you please clarify this comment?



This check isn't any kind of failure; it's due to a hardware quirk with
earlier prototypes.  Basically, during suspend/resume, the touchpad
rails stay powered.  We don't want to do any sort of reset of the
psmouse device, otherwise we lose data (especially if someone is waking
up the device via touchpad usage or button press, we certainly don't
want to reset and drop the packets).

However, b1 hardware required a reset for reasons that I can't recall
anymore.  In both cases, the reconnect worked just fine; the difference
is that a psmouse_reset was issued for b2 hardware and higher.

I suppose the code should have a comment saying just that, eh? :)


*nod*


PSMOUSE_DEFINE_ATTR is fine for show_powered, but doesn't work for
set_powered because it
a) doesn't change the value if psmouse->state == PSMOUSE_IGNORE
b) does some deactivation dance/activate dance

I don't remember the specifics, but our powered stuff wasn't working as
a PSMOUSE_DEFINE_ATTR callback.  At some point soon I'll take another
look at it and see what the specific problem was.


Agreed, the mutex stuff is not ideal.


Hm, good point; set_powered should be setting PSMOUSE_IGNORE when
powering the device off!


According to the commit I made some time ago, it's to protect against
a race with kpsmouse_wq that would cause an oops.  I don't actually
know if I was being paranoid there, or if there actually _was_ an oops
that was being triggered.

You're right though, psmouse_disconnect should take care of it for us..
 

*nod*, I'll see what I can do about the powered thing.  Thanks!
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Wed Aug 13, 12:24 pm)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Dmitry Torokhov, (Thu Aug 14, 8:14 pm)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Thu Aug 28, 11:49 pm)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Dmitry Torokhov, (Wed Sep 10, 6:00 am)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Wed Sep 10, 2:55 pm)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Wed Sep 10, 10:01 pm)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Wed Sep 10, 10:32 pm)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Dmitry Torokhov, (Thu Sep 11, 5:59 am)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Dmitry Torokhov, (Thu Sep 11, 6:05 am)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Thu Sep 11, 7:32 am)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Thu Sep 11, 11:32 am)
Re: [PATCH 3/3] OLPC: touchpad driver (take 2), Andres Salomon, (Thu Sep 11, 11:34 am)