Re: [PATCH v5 1/2] input: add support for Nomadik SKE keypad controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 15, 2010 at 10:49:03AM +0200, Sundar R IYER wrote:
> Hi Dmitry,
> 
> >-----Original Message-----
> >From: Dmitry Torokhov [mailto:dmitry.torokhov@xxxxxxxxx]
> 
> >> +
> >> +	/* disable auto scan interrupt; mask the interrupt generated */
> >> +	ske_keypad_set_bits(keypad, SKE_IMSC, ~SKE_KPIMA, 0x0);
> >> +	ske_keypad_set_bits(keypad, SKE_ICR, 0x0, SKE_KPICA);
> >> +
> >> +	mod_timer(&keypad->timer, jiffies + 2);
> >> +
> >
> >I expected you would do "return IRQ_HANDLED;" here so that hardware
> >polling is done exclusively in timer handler.
> >
> What I thought is: enable the timer by default; so that in case we find out the
> ASRs aren't stable, the reporting automatically will get deferred to the timer. In
> a normal case, when the ASRs are stable, the reporting gets done by the IRQ handler;
> in case they aren't, the reporting will get done by the timers. Is this not correct?

My concern was is that first time around ASRs are not stable; you defer
to timer. Then you get 2nd interrupt and ASRs are stable now so both IRQ
and timer trying to work the hardware.

If you have IRQ kick the timer and bail only timer (and only 1 instance)
accesses the hardware.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux