On Thu, 28 Jul 2011, Daniel Drake wrote: > On 28 July 2011 16:08, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > Aren't there? �I have no idea. �But if input devices are never > > wakeup-capable, why do you name your function "input_may_wakeup()"? > > I guess i8042_may_wakeup() would be a better name for it. In this > case, the only device in the hierarchy (i8042 -> serio -> input) that > is marked wakeup capable is the i8042 device (and only via my > patches). I'd welcome a better design. My experience in this area is _extremely_ limited. Take a look at commits b14e033e17d0ea0ba (PNPACPI: Add support for remote wakeup) and 3e6e15a862a0bc201 (Input: enable remote wakeup for PNP i8042 keyboard ports). > > I'm using a normal PC with PS/2 mouse and keyboard. �It is set up with > > the keyboard as a wakeup source but not the mouse. �Of course, this > > uses ACPI, which I assume isn't present on OLPC. > > It does depend on how the system is designed, yes. I suspect that the > device that is actually marked as wakeup capable on your setup is not > an input device, but rather another part of the /sys tree (perhaps > part of the ACPI tree?). It is the PNP keyboard device (whichever that is!), enabled by the second commit above. > Also, I suspect that if your system is woken > up by the keyboard, it loses the keypress which was used to wake it > up. Could be; I don't recall ever having tested this. > I'm definitely open to better ways of doing this. The key considerations are: > 1. We only have control over wakeups at the i8042 level; i.e. we > cannot ask for keyboard wakeups but not mouse. > 2. Our keyboard and mouse hardware is guaranteed to be powered > throughout suspend > 3. The key press or mouse movement or click that woke the system must > not be lost during resume. This means that all 3 layers (i8042, serio, > input) must not reset or really do anything with the device during > suspend/resume. At this point I have reached my level of incompetence... so I'll shut up now. :-) Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html