[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Save trackpad settings during sleep



On   9 Jun, this message from Michael Schmitz echoed through cyberspace:
>> > On the Lombard, the ADB devices are apparently reprobed and reset before
>> > pmud restores the device state.

On my TiBook, BenH' 2.4.5-pre kernel reprobes all ADB devices after
wakeup. This, I think, is not new; what's changed is the fact that the
rescan is not done inline in the wakeup code path, but rather a kernel
thread is started that does the probe. Wakeup is faster, since we don't
block on the ADB probe.

Which in turn means that it is now possible for other post-wakeup code
to be run _before_ the ADB probe task is through with the bus fiddling.
I guess that's what Tom's hitting here.

> I don't think the kernel 'resets' the device, it justs initiates a bus
> reset and that brings all devices to the powerup defaults.

Probably the ADB bus is powered down during sleep; so you need to
restart it from scratch after wakeup-- no different than at system
startup. Which means that in a perfect world, there should be a way for
the kernel to ask for configuration after ADB is up; be it at system
startup or after wakeup.

By the way, Tom, how are you configuring the trackpad on boot?

> If pmud looks
> for the trackpad before the bus reset is done the device probably isn't
> there yet. Anyway, if that happens while user space is already running
> again we've got a race. pmud used to run only after device wakeup in 2.2.

Yep; ADB rescan is done async in a thread.

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "



Reply to: