Re: [PATCH 00/53] staging: comedi: addi_apci_3xxx: cleanup driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Originally posted 2013-06-17.  Reposting to new driverdev-devel list.]

On 2013-06-13 00:03, H Hartley Sweeten wrote:
Separate this driver from the addi-data "common" code so the bloat
can be removed.

Cleanup all the subdevice support functions and fix the analog input
subdevice so it works correctly with the comedi core.

Remove all the cruft.

Looks good. The only thing I'd maybe do is add a check that the channel number is valid in differential (AREF_DIFF) mode. Some boards allow all AI channels to be used in differential mode and others only allow the first half of the channels. (These cases are distinguishable from the subdevice flags.) A function could be added to check the 'aref' code and channel number encoded in the 'chanspec' value are valid. This could be called from apci3xxx_ai_setup() and from apci3xxx_ai_cmdtest() if cmd->chanlist is non-NULL (cmd->chanlist is allowed to be NULL for the COMEDI_CMDTEST ioctl). (Presumably the hardware would still read *something* in differential mode for the invalid channels, and maybe the user of the hardware should be aware of the limitation, but it seems better to return an error.)

Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux