Thread (66 messages) 66 messages, 12 authors, 2009-08-22

Re: Threaded interrupts for synaptic touchscreen in HTC dream

From: David Brownell <hidden>
Date: 2009-07-22 17:34:08
Also in: linux-i2c, lkml

On Wednesday 22 July 2009, Thomas Gleixner wrote:
quoted
Can that be cleaned up a bit, so that the handle_level_oneshot_irq()
and unmask_oneshot_irq() stuff kicks in automatically when needed,
instead of requiring board-specific (or driver-specific) code to get
that stuff right?
The only way I can see is to set a special trigger flag like
IRQF_TRIGGER_RISING & Co. 

i.e. IRQF_TRIGGER_LEVEL | IRQF_TRIGGER_ONESHOT

That might work.
That direction, yes ... request_threaded_irq() can't infer ONESHOT
from IRQF_TRIGGER_{LOW,HIGH} since the hardirq handler might be
able to get Real Work (tm) done in some non-I2C/non-SPI cases.

Another alternative syntax:  magic cookies for the hardirq handler.
Example, pass NULL to get a default punt-to-irqthread behavior, with
ONESHOT set up if it sees IRQF_TRIGGER_HIGH or IRQF_TRIGGER_LOW.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help