linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Datta, Shubhrajyoti" <shubhrajyoti@ti.com>
To: Rakesh Iyer <riyer@nvidia.com>
Cc: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	Stephen Warren <swarren@nvidia.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] Input: tegra-kbc - enable key interrupt for wakeup
Date: Tue, 24 Jan 2012 10:54:54 +0530	[thread overview]
Message-ID: <CANQgH-beKYUpRigRRgzDmWajoSd7ZT_k_EaWkUax2XzqHKg8og@mail.gmail.com> (raw)
In-Reply-To: <1FC56210173BB445BD77F608D6FB8D034F401D296F@HQMAIL03.nvidia.com>

Hi Rakesh,

On Thu, Jan 19, 2012 at 11:51 PM, Rakesh Iyer <riyer@nvidia.com> wrote:
>>       if (device_may_wakeup(&pdev->dev)) {
>>               disable_irq_wake(kbc->irq);
>>               tegra_kbc_setup_wakekeys(kbc, false);
>> +             /* We will use fifo interrupts for key detection. */
>> +             tegra_kbc_set_keypress_interrupt(kbc, false);
> Why do yo disable on resume why not have it enabled always?
>
>>
>>               /* Restore the resident time of continuous polling mode. */
>>               writel(kbc->cp_to_wkup_dly, kbc->mmio + KBC_TO_CNT_0);
>
> For the relevant discussion, Tegra KBC provides the following interrupts -
> a) The keypress interrupt which is generated as soon as a key is pressed,
>      before matrix scanning begins.
> b) FIFO interrupt which is generated when actual keys are decoded from the matrix,
>     and put into the FIFO.
>
> During normal operation the keypress interrupt is not useful as we have to wait for the
> keys to make it into the FIFO before reporting it to the higher layers.
>
> Since we have turned off scanning(in the following commit) we cannot use the FIFO interrupt
> during the resume, so we rely on the keypress interrupt and generate the wakeup key.
>
> Commit that turned off scanning
>
>    Input: tegra-kbc - fix wakeup from suspend
>
>    For wakeup to be reliable, kbc needs to be in interrupt mode before suspend.

Does it need to be disabled at resume?

>    Created common routine to control the FIFO interrupt.
>    Added synchronization to ensure orderly suspend.
>
>
> Regards
> Rakesh

      reply	other threads:[~2012-01-24  5:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 22:33 [PATCH v1] Input: tegra-kbc - enable key interrupt for wakeup Rakesh Iyer
2012-01-19  5:47 ` Shubhrajyoti
2012-01-19 18:21   ` Rakesh Iyer
2012-01-24  5:24     ` Datta, Shubhrajyoti [this message]

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=CANQgH-beKYUpRigRRgzDmWajoSd7ZT_k_EaWkUax2XzqHKg8og@mail.gmail.com \
    --to=shubhrajyoti@ti.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riyer@nvidia.com \
    --cc=swarren@nvidia.com \
    /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).