Thread (8 messages) 8 messages, 3 authors, 2011-09-30

Re: Handling multiple GPIO controllers in 8xxx GPIO driver

From: Grant Likely <hidden>
Date: 2011-09-30 00:22:08

On Thu, Sep 29, 2011 at 08:22:06PM +0000, Tabi Timur-B04825 wrote:
Grant Likely wrote:
quoted
A chained handler has an expedited path through the interrupt code for
handling it (basically, it skips handling it at the parent controller
and passes through to the child, but it cannot handle multiple chained
children on a single irq input.
So you can't do a shared chained handler?  If the chained handler returns 
IRQ_NONE, the interrupt code just gives up?
No, you can do one or more regular handlers which acks or masks the
irq in the upstream controller, or you can do a single chained handler
which bypasses any ack/mask.  It's an optimization.  The code *could*
be modified to allow multiple chained handlers, but I cannot comment
on if it would be worthwhile.

Basically, a chained handler replaces the regular edge or level irq
handler.  Take a look at __irq_set_handler().  Chained in this case is
really a synonym for a cascaded irq handler.  Also, I believe it only
really works if the irq is level sensitive because an edge sensitive
irq would still need to be acked.  It would also need to be an irq
controller that can be accessed immediately since it depends on the
child controller to ack/mask it's inputs.  Something on an i2c bus
wouldn't work so well because the irq would remain asserted until
after several slow i2c transactions.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help