Thread (4 messages) 4 messages, 2 authors, 2016-04-01

Re: [PATCH 1/1] gpio: mcp23s08: Add support for level triggered interrupts

From: Linus Walleij <hidden>
Date: 2016-04-01 13:29:24
Also in: lkml

On Thu, Mar 31, 2016 at 10:58 AM, Alexander Stein
[off-list ref] wrote:
On Thursday 31 March 2016 10:41:24, Linus Walleij wrote:
From the reference manual:
quoted
The INTCAP register captures the GPIO port value at
the time the interrupt occurred. The register is ‘read
only’ and is updated only when an interrupt occurs. The
register will remain unchanged until the interrupt is
cleared via a read of INTCAP or GPIO.
So, i guess you're right. Although currently I don't know why
handle_simple_irq would not work if this would not be the case.
The usual construction is that for edge triggered interrupts
there is an ACK register where a bit goes to "1" whenever it
triggers on an edge, and this must be taken down by an explicit
read or even write of the ACK registers.

Level triggered interrupts by contrast, are just a register
reflecting the value of the interrupt line: it only remains set
to "1" as long as the external source holds it high, and will
go low as soon as the device causing he interrupt releases
it.

Therefor level triggered interrupts often do not need any
explicit ACK at all.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help