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>
Thu, 15 Feb 2018 17:41:08 +0000 (17:41 +0000)
commitc7a88702aa0de43bd784e96b940bb592f003e25b
treeea085061165579cc01324451005b7b2b45060177
parent61d136ff9eec815d88cc8d4c3de99a6c850bad14
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