RE: [PATCH 00/31] staging: comedi: pcl711: cleanup driver

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

 



On Monday, September 23, 2013 9:23 AM, Ian Abbott wrote:
> On 2013-09-21 00:33, H Hartley Sweeten wrote:
>> Tidy up this driver a bit.
>>
>> Unfortunately not a great reduction in the lines of code but it did
>> uncover a couple bugs in the 8112 board and async command support.
>>
>> The async command support still needs to be looked over.
>>    1) The analog input sample read in the interrupt routine is not
>>       returned to the user.
>>    2) The scan_end_src and/or stop_src appears to be broken. As noted
>>       in the interrupt routine, nothing sets 'ntrig' which is used to
>>       cause the COMEDI_CB_EOA event.

[snip]

> Looks good.
>
> I can take a look at the async command support once this series has been 
> committed if you like.  Basically, comedi_buf_put() can be used in the 
> interrupt handler to write the sample to the comedi buffer.  If it 
> returns 0 (unsuccessful), the interrupt routine should set the 
> COMEDI_CB_OVERFLOW event flag (it can also set COMEDI_CB_ERROR, but that 
> is already set by comedi_buf_put()).  If comedi_buf_put() returns 1 
> (successful), then since the "scan length" is always 1 (a single sample) 
> in this driver, it can set the COMEDI_CB_EOS event flag. 
> pcl711_ai_cmd() should set devpriv->ntrig to the number of scans (or the 
> number of conversions) if cmd->stop_src == TRIG_COUNT.  The interrupt 
> handler should only decrement devpriv->ntrig if s->async->cmd.stop_src 
> == TRIG_COUNT.  (Also, devpriv->ntrig should be an unsigned int.)
>
> Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

Thanks!

I'm hoping this series, and the adl_pci6208 cleanup, get applied by Greg before
Stephen Rothwell freezes linux-next on Friday. Once this is in if you can fix up
the command support that would be great!

Regards,
Hartley

_______________________________________________
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