Linux Input/HID development
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: linux-omap@vger.kernel.org, stable@kernel.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-input@vger.kernel.org, Felipe Balbi <balbi@ti.com>
Subject: Re: Interrupt issue in twl4030_keypad
Date: Mon, 12 Dec 2011 21:12:45 +0200	[thread overview]
Message-ID: <20111212191241.GC3408@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <CAMP44s2xhZaoM4KVT0jC5RpdW7Ezp9YAHMG1pC+30Bbqjno7jg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]

Hi,

On Mon, Dec 12, 2011 at 08:30:49PM +0200, Felipe Contreras wrote:
> The short version is this: either we revert this patch[1], or we apply
> this patch series[2], as well as its essential fixes[3].
> 
> The long version is this. There's a synchronization issue with the
> current keypad driver and twl core; the irq is marked as handled even
> though the thread that is supposed to handle it hasn't run yet, and
> since it's clear-on-read, and it hasn't been read, it's detected
> again, so they keypad driver receives two interrupt callbacks instead
> of one, and in the second one reads nothing from the i2c register, so
> a key release is assumed. This makes key-presses as simple as shift+a
> impossible.
> 
> In other words, it's totally unreliable. This might not be isolated to
> the keypard driver, but other "nested" interrupts from twl core that
> started using request_threaded_irq prematurely (before it was
> supported by the twl core). But at least I haven't tried those.
> 
> This patch was applied on 2.6.33, which means all versions before 3.2
> are affected, including 3.1.
> 
> What do you think about fixing this on stable kernels?

I believe Samuel has already applied those to the MFD tree. The funny
part is that those patches were pending on linux-omap for over 2 months
I have refreshed them over and over again and asked for help from other
people to test.

Everything went smooth on my simple beagle board with no keypad and I
couldn't see any issues, unfortunately. Still, 2 months is a whole lot
of time to NAK a patch, but nobody said anything so, of course, Samuel
assumed it was ok and, like I said above, it worked for my simple GPIO
usecase with beagleboard.

Oh well, it won't change anything now, Sam has applied Neil's fixes.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2011-12-12 19:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 18:30 Interrupt issue in twl4030_keypad Felipe Contreras
2011-12-12 19:12 ` Felipe Balbi [this message]
2011-12-12 20:55   ` Felipe Contreras
2011-12-12 21:34     ` Felipe Balbi
2011-12-16  1:36       ` Felipe Contreras
2011-12-13 13:15     ` Grazvydas Ignotas
2011-12-12 19:23 ` Greg KH
2011-12-12 21:04   ` Felipe Contreras
2011-12-12 21:30     ` Greg KH

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=20111212191241.GC3408@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --cc=felipe.contreras@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=stable@kernel.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