linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.ml.walleij@gmail.com>
To: Trilok Soni <tsoni@codeaurora.org>
Cc: Sundar R IYER <sundar.iyer@stericsson.com>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>
Subject: Re: [PATCH v3 1/1] input: add support for Nomadik SKE keypad controller
Date: Wed, 8 Sep 2010 16:19:45 +0200	[thread overview]
Message-ID: <AANLkTinYfUVGignRSA+GPWz4yHothgm6TTyt7ruMvmS9@mail.gmail.com> (raw)
In-Reply-To: <4C87885C.70704@codeaurora.org>

2010/9/8 Trilok Soni <tsoni@codeaurora.org>:
> [Sundar]
>> Yes it can. I am seeing increasing tendency to migrate to threaded_irq from the legacy irq recently
>> and hence the threaded request.
>
> Use threaded_irq only when needed with different flags and not everywhere. In this case we don't
> need threaded irq at all.

Look closer at the IRQ handler:

+static irqreturn_t ske_keypad_irq(int irq, void *dev_id)
(...)
+       /*
+        * if KPASON is not ready, we cannot read data registers
+        * so wait for a debounce period; if still not settled,
+        * we fire a timer and exit the IRQ
+        */
+       while ((readl(keypad->reg_base + SKE_CR) & SKE_KPASON) && timeout--)
+               cpu_relax();

Active polling. Surely you want this to be preemptible? Thus ->
threaded handler.

Yours,
Linus Walleij

  reply	other threads:[~2010-09-08 14:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 12:48 [PATCH v3 1/1] input: add support for Nomadik SKE keypad controller Sundar Iyer
2010-09-06 15:07 ` Datta, Shubhrajyoti
2010-09-06 15:16   ` Sundar R IYER
2010-09-06 15:41     ` Datta, Shubhrajyoti
2010-09-06 15:43       ` Sundar R IYER
2010-09-07  6:37 ` Dmitry Torokhov
2010-09-07  6:49   ` Sundar R IYER
2010-09-07 14:01 ` Trilok Soni
2010-09-08 12:55   ` Sundar R IYER
2010-09-08 12:58     ` Trilok Soni
2010-09-08 14:19       ` Linus Walleij [this message]
2010-09-08 15:46         ` Dmitry Torokhov
2010-09-09  4:22           ` Sundar R IYER
2010-09-13  7:31             ` Sundar R IYER

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=AANLkTinYfUVGignRSA+GPWz4yHothgm6TTyt7ruMvmS9@mail.gmail.com \
    --to=linus.ml.walleij@gmail.com \
    --cc=STEricsson_nomadik_linux@list.st.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sundar.iyer@stericsson.com \
    --cc=tsoni@codeaurora.org \
    /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).