staging: comedi: adv_pci_dio: Add interrupt handling for PCI-1730
On the Advantech PCI-1730, four digital inputs (DI0, DI1, IDI0 and IDI1)
can be used as external interrupt sources. Each input can be programmed
to latch an interrupt bit on either a rising edge or a falling edge (but
not both).
Add a new Comedi subdevice for each interrupt source, supporting the
asynchronous command interface. Subdevices 5, 6, 7 and 8 are for
interrupt sources DI0, DI1, IDI0 and IDI1. They each write the state of
16 digital inputs to the subdevice's data buffer each time the
corresponding interrupt occurs. (For DI0 and DI1, use the 16
non-isolated digital inputs. For IDI0 and IDI1, use the 16 isolated
digital inputs.)
Currently, only rising edge triggers are supported. Support could be
added for the PCI-1733 and PCI-1736.
Signed-off-by: Bernd Harries <bha@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210118144359.378730-2-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>