[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1FC56210173BB445BD77F608D6FB8D034F3D1BB4C9@HQMAIL03.nvidia.com>
Date: Thu, 1 Dec 2011 13:09:59 -0800
From: Rakesh Iyer <riyer@...dia.com>
To: 'Dmitry Torokhov' <dmitry.torokhov@...il.com>
CC: "rydberg@...omail.se" <rydberg@...omail.se>,
Stephen Warren <swarren@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: RE: [PATCH v1] Input: tegra-kbc - report wakeup key for some
platforms.
Hello Dmitry.
Sorry for the wrap issue, my Outlook does not seem to obey the settings.
I wanted to explain the tegra system resume path implementation so I can justify
why I am doing this complicated fix and why I feel it will guarantee the resume
is due to keypress.
The tegra wake resume code is registered as a syscore ops.
When the system is resumed due to a wake event, the suspend_enter (after wakeup)
routine will invoke the tegra syscoreops_resume method and that routine will propagate
the wake event to the individual ISR's through genirq.
If kbc was wake source, kbc_isr will be invoked in this execution path.
If system is resumed due to other reason, the tegra_syscoreops_resume code will not
find the event.
In the kbc we ignore all keypresses until kbc_resume re-enables the fifo interrupt.
So the only way to generate this key would be if the tegra_syscoreops_resume
finds that kbc was wake source
Maybe my understanding is wrong. Please feel free to correct me.
Regards
Rakesh
> -----Original Message-----
> From: Dmitry Torokhov [mailto:dmitry.torokhov@...il.com]
> Sent: Wednesday, November 30, 2011 11:27 PM
> To: Rakesh Iyer
> Cc: rydberg@...omail.se; Stephen Warren; Laxman Dewangan; linux-
> kernel@...r.kernel.org; linux-input@...r.kernel.org; linux-tegra@...r.kernel.org
> Subject: Re: [PATCH v1] Input: tegra-kbc - report wakeup key for some platforms.
>
> On Wed, Nov 30, 2011 at 02:14:03PM -0800, Rakesh Iyer wrote:
> > Thanks Dmitry.
> >
> > Since there can be multiple wake causes I wanted to isolate wake key
> > generation to the case where keyboard actually generated the wake
> > interrupt.
>
> I do not think you can guarantee this though because if user touches
> keyboard "too early", before your resume method had a chance to disable
> kbc interrupt as a wakeup source, you are still going to get that
> interrupt and deliver KEY_POWER even though KBC is not the actual wakeup
> source.
>
> So don't over-complicate it. If hardware can't detect actual key pressed
> just emit KEY_POWER if a key was at any time between calls to
> tegra_kbc_suspend() and tegra_kbc_resume().
>
> BTW, could you please have your MUA wrap long lines around 75 column or so?
>
> Thanks.
>
> --
> Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists