From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: request_irq in I2C driver causes kernel to freeze during probe, but if done later - no problem!
Date: Sat, 27 Mar 2010 09:17:37 +0000 [thread overview]
Message-ID: <20100327091736.GI29179@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4BAD4FDE.2010904@atmel.com>
On Sat, Mar 27, 2010 at 01:22:54AM +0100, Ulf Samuelsson wrote:
> This is my interrupt routine, which always return IRQ_HANDLED.
> sysfs shows that "mxt->invalid_irq_counter" is never incremented
> even after I successfully enable the interrupt in sysfs.
>
> mxt->dwork will always access the I2C bus but we dont see that.
>
> static irqreturn_t mxt_irq_handler(int irq, void *_mxt)
> {
> struct mxt_data *mxt = _mxt;
> unsigned long flags;
> mxt->irq_counter++;
> spin_lock_irqsave(&mxt->lock, flags);
>
> if (mxt_valid_interrupt()) {
> /* Macro, always returning 1 on these boards */
> cancel_delayed_work(&mxt->dwork);
> schedule_delayed_work(&mxt->dwork, 0);
> mxt->valid_irq_counter++;
> } else {
> mxt->invalid_irq_counter++;
The other thing is that in this case you should ultimately return
IRQ_NONE from this handler.
prev parent reply other threads:[~2010-03-27 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 23:16 request_irq in I2C driver causes kernel to freeze during probe, but if done later - no problem! Ulf Samuelsson
2010-03-26 23:24 ` Russell King - ARM Linux
2010-03-27 0:22 ` Ulf Samuelsson
2010-03-27 0:41 ` Ulf Samuelsson
2010-03-27 1:12 ` Ben Dooks
2010-03-27 7:01 ` Ulf Samuelsson
2010-03-27 10:11 ` Russell King - ARM Linux
2010-03-27 11:06 ` request_irq in I2C driver causes kernel to freeze duringprobe, " Ulf Samuelsson
2010-03-29 10:01 ` request_irq in I2C driver causes kernel to freeze during probe, " Mark Brown
2010-03-27 9:16 ` Russell King - ARM Linux
2010-03-27 9:17 ` Russell King - ARM Linux [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=20100327091736.GI29179@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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).