From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-input@vger.kernel.org, linux-pm@lists.linux-foundation.org,
rjw@sisk.pl, dilinger@queued.net, pgf@laptop.org
Subject: Re: [PATCH v4 1/2] Input: enable i8042-level wakeup control
Date: Wed, 3 Aug 2011 12:38:14 -0700 [thread overview]
Message-ID: <20110803193814.GA17944@core.coreip.homeip.net> (raw)
In-Reply-To: <CAMLZHHQAjarobktUFiZF7aEVvLuaaAFSBuzrMj4pT_67BFssjA@mail.gmail.com>
On Wed, Aug 03, 2011 at 08:24:46PM +0100, Daniel Drake wrote:
> On Wed, Aug 3, 2011 at 7:43 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> 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.
I believe we can and do mark devices such as USB as wakeup capable on
other arches, you do not have control here. That is why I am uneasy with
doing this in input core.
>
> >> > 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.
Is there any keys that are not autorepeating. For example regular
(non-OLPC) laptops usually do not repeat suspend and other special keys.
In fact, they quite often forget to send release events for them ;)
>
> 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.
Much appreciated, sorry for being a pain.
--
Dmitry
next prev parent reply other threads:[~2011-08-03 19:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 15:49 [PATCH v4 1/2] Input: enable i8042-level wakeup control Daniel Drake
2011-08-03 6:59 ` Dmitry Torokhov
2011-08-03 8:04 ` Daniel Drake
2011-08-03 18:43 ` Dmitry Torokhov
2011-08-03 19:24 ` Daniel Drake
2011-08-03 19:38 ` Dmitry Torokhov [this message]
2011-08-03 19:51 ` Daniel Drake
2011-08-05 15:24 ` Daniel Drake
2011-08-11 18:02 ` Daniel Drake
2011-08-17 7:03 ` Dmitry Torokhov
2011-09-03 12:45 ` Daniel Drake
2011-08-03 8:12 ` Wanlong Gao
-- strict thread matches above, loose matches on Subject: below --
2011-08-02 15:49 Daniel Drake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110803193814.GA17944@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dilinger@queued.net \
--cc=dsd@laptop.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pgf@laptop.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).