request_irq in I2C driver causes kernel to freeze during probe, but if done later - no problem!
From: Russell King - ARM Linux <hidden>
Date: 2010-03-27 09:17:37
From: Russell King - ARM Linux <hidden>
Date: 2010-03-27 09:17:37
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.