Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5c2d4cba authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_apci_2032: use channel list



When setting up asynchronous commands for the special interrupt
subdevice, use the channel list to decide which interrupt sources to
enable.  Set the maximum length of the channel list to be the same as
the number of channels (2).  Normally, the channel list would include
channel 0, channel 1 or both.

When reading the scan data in the interrupt routine, the readings from
each channel in the channel list will be packed into a single unsigned
short data value.  Make each bit in this value correspond to an index in
the channel list.

Since all the channels in the channel list are read at the same time,
insist that the scan end argument is the length of the channel list and
that the conversion source is `TRIG_NOW`.

Allocate some private data for the special interrupt subdevice to hold a
spin-lock, the channels to be enabled and an indication of whether the
command is still active.  Stop the command if a buffer overflow occurs.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef6543db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment