mcp2515: Use DT-supplied interrupt flags
authorPhil Elwell <phil@raspberrypi.org>
Tue, 14 Nov 2017 11:03:22 +0000 (11:03 +0000)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:57:24 +0000 (15:57 +0100)
commit5917bebcc539d79daf061ce9ee57b9d36b491103
tree5402c954dc62df9e1a4a05ea4d04fc28df7a8cd2
parent8a6581f12e2459a09f4ad903bd731fb457469ec0
mcp2515: Use DT-supplied interrupt flags

The MCP2515 datasheet clearly describes a level-triggered interrupt
pin. Therefore the receiving interrupt controller must also be
configured for level-triggered operation otherwise there is a danger
of a missed interrupt condition blocking all subsequent interrupts.
The ONESHOT flag ensures that the interrupt is masked until the
threaded interrupt handler exits.

Rather than change the flags globally (they must have worked for at
least one user), allow the flags to be overridden from Device Tree
in the event that the device has a DT node.

See: https://github.com/raspberrypi/linux/issues/2175
     https://github.com/raspberrypi/linux/issues/2263

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts
arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts
drivers/net/can/spi/mcp251x.c