From: H Hartley Sweeten Date: Wed, 12 Jun 2013 23:22:53 +0000 (-0700) Subject: staging: comedi: addi_apci_3xxx: fix the analog input subdevice X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~108 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f32376e993a7657198974e713577152ac67833db;p=pandora-kernel.git staging: comedi: addi_apci_3xxx: fix the analog input subdevice The analog input subdevice support functions in hwdrv_apci3xxx.c do not follow the comedi API. The (*insn_config) function overrides the INSN_CONFIG_DIO_INPUT instruction as an internal APCI3XXX_CONFIGURATION instruction. The APCI3XXX_CONFIGURATION instruction requires 4 data parameters but the comedi core sanity checks the INSN_CONFIG_DIO_INPUT instruction which only has 1 data parameter. Because of this the (*insn_config) function can never be called. The (*insn_read) function is supposed to do "one-shot" or "software- triggered" reads and return the data. The function in hwdrv_apci3xxx.c does do this but it also is used to optionally start a "hardware- triggered" conversion. Hardware-triggered conversions should be done with the comedi_async command functions. Delete the hwrdv_apci3xxx.c file and fix the analog input subdevice in the driver by: 1) add a new (*insn_read) function for "one-shot" reads 2) implement the (*do_cmdtest) and (*do_cmd) functions for "hardware-triggered" asyncronous reads 3) fix the interrupt handler to return the read data via the comedi_async buffer Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed