[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: pending interrupts
From:       Matthias Welwarsky <mwelwarsky () web ! de>
Date:       2004-09-14 16:57:26
Message-ID: 200409141912.50546.mwelwarsky () web ! de
[Download RAW message or body]

On Tuesday 14 September 2004 16:26, Nicolas Pitre wrote:
> On Tue, 14 Sep 2004, Hinko Kocevar wrote:
> > Russell King - ARM Linux wrote:
> > > Why do you think you don't need this?
> >
> > I coded driver for rotary pulse generator (RPG)- potentiometer like piece
> > of hardware that connects to two gpio pins, and generates pulses on both
> > pins according to direction being rotated. For detection of pulses and
> > consequently detection of turning direction I used those two pins as
> > interrupts. It works fine, but as I said, if interrupts are pending there
> > are some unwanted effects. Eg. Turning the RPG causes value displayed on
> > LCD to change, what I don't want is value changing after I stop turning
> > it - which is the effect of pending interrupts accumulated.
> >
> > Maybe there is another way to handle this?
>
> This looks like a perfect fit for a FIQ handler to me, given you're
> using GPIOs which interrupts aren't multiplexed on the same IRQ.

Well, yes, but it's rather difficult to communicate things from an FIQ 
handler. You'll have to queue decoded events in the FIQ and poll the queue in 
a regular timer handler every now and then. Also, it's a little difficult to 
write the FIQ code in C, since you lack a stack :)

>
>
> Nicolas
>
> -------------------------------------------------------------------
> Subscription options:
> http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ:      
> http://www.arm.linux.org.uk/armlinux/mlfaq.php
> Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic