linux/drivers/staging/comedi
Ian Abbott 2b56b35820 staging: comedi: das08: improve test for programmable gain
`das08_ai_rinsn()` handles Comedi `INSN_READ` instructions for the AI
subdevice.  This programs the gain for the analog input channel if the
board has support for that, and acquires data from the channel.  If
programmable gain is supported, the gain code is read from the array
pointed to by `devpriv->pg_gainlist` indexed by the range index.  The
function assumes that programmable gain is supported if the AI
subdevice's range table supports more than one range.  Replace that with
a more direct test for `devpriv->pg_gainlist` being non-NULL, as it is
only initialized to a non-NULL pointer for boards that support
programmable gain.

This will also allow range tables to be included for convenience for
those boards that support multiple ranges by DIP switches.  Those boards
are currently initialized to use a single "unknown" range.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:06:39 -07:00
..
drivers staging: comedi: das08: improve test for programmable gain 2015-06-12 17:06:39 -07:00
kcomedilib
comedi_buf.c
comedi_compat32.c
comedi_compat32.h
comedi_fops.c Staging: fixed multiple spelling errors. 2015-05-08 09:23:58 +02:00
comedi_internal.h staging: comedi: wrap COMEDI_SRF_FREE_SPRIV usage 2015-04-30 17:15:59 +02:00
comedi_pci.c
comedi_pci.h staging: comedi: comedi_pci.h: move PCI stuff out of comedidev.h 2015-03-20 14:08:18 +01:00
comedi_pcmcia.c
comedi_pcmcia.h
comedi_usb.c
comedi_usb.h
comedi.h Drivers: staging: comedi: comedi: Fixed comment spelling error 2015-05-24 13:11:44 -07:00
comedidev.h staging: comedi: move COMEDI_SRF_... macros to "comedi_fops.c" 2015-04-30 17:15:59 +02:00
comedilib.h
drivers.c staging: comedi: wrap COMEDI_SRF_FREE_SPRIV usage 2015-04-30 17:15:59 +02:00
Kconfig staging: comedi: comedi_8255: new module split from 8255 2015-05-31 10:05:26 +09:00
Makefile
proc.c
range.c
TODO