Re: [PATCH v4 1/2] Input: enable i8042-level wakeup control

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

 



On Wed, Aug 3, 2011 at 7:43 PM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> No, I do not believe we can do what you are doing in input core. You are
> changing behavior for one platform and one (or 2 drivers) that will not
> be matched (at least I don't think so) by anything else out there. What
> will happen if you plug a random USB keyboard into OLPC box? Will it keep
> leds powered?

In all other cases, behaviour is unchanged. The input device is not
marked as wakeup capable, therefore the user cannot mark it as
wakeup-enabled, therefore this code does not execute.

So a USB keyboard on an OLPC laptop would behave exactly as it does
before this patch, as would devices on other systems.

The only way this functionality gets enabled is at the code level (as
it does in patch 2/2), and then once the user has requested wakeups on
all devices in the chain.

>> > Does the controller wakes up the system on key release or only press? My
>> > concern is with cases when we suspend with a key pressed and wake up
>> > with it already released.
>>
>> It wakes up on key press, but our EC buffers communication, so both
>> the key press and key release event would be delivered in the above
>> scenario.
>
> Just to confirm, we 3 events will be delivered in this case:

Sorry, I misunderstood the question and answered "what happens if the
system is sleeping and you press and quickly release a key before the
system is fully running" - in which case the system wakes up and
delivers both events.

For the question you asked, regarding a key being pressed as the
system goes into suspend, the system wakes up from suspend
immediately.
I just tested this by holding the 'i' key down while going into suspend.
While the key is being held down, the system receives repeated
interrupts with data 0x17 ('i' key pressed). The system suspends, but
then immediately wakes up, and continues the flood of 0x17 interrupts.
When I release the key a few seconds later, a 0x97 ('i' released)
interrupt arrives.

I guess the more accurate way to describe the wakeup condition is that
it wakes up on any i8042 interrupt.

> I also wonder what will happen with non-PS2 devices...

Again - other devices are not affected.

> Instead of wiring it all through input core could we contain this in
> atkbd and hgpk by registering pm_notifiers and ignoring certain requests
> from input/serio cores during system state transition on OLPC only?

I'll look into this, thanks for the suggestion.

Daniel
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux