RE: [PATCH 61/62] staging: comedi: me4000: remove sanity checks in me4000_ao_insn_write()

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

 



On Wednesday, August 27, 2014 11:07 AM, Ian Abbott wrote:
> On 27/08/14 19:04, Hartley Sweeten wrote:
>> On Wednesday, August 27, 2014 11:00 AM, Ian Abbott wrote:
>>> On 26/08/14 00:04, H Hartley Sweeten wrote:
>>>> The comedi core does the sanity checking of the comedi_insn before
>>>> calling the (*insn_write). Remove the unnecessary checks.
>>>>
>>>> Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
>>>> Cc: Ian Abbott <abbotti@xxxxxxxxx>
>>>> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>>>> ---
>>>>    drivers/staging/comedi/drivers/me4000.c | 33 ++-------------------------------
>>>>    1 file changed, 2 insertions(+), 31 deletions(-)
>>
>> [snip]
>>
>>> I thought you might have updated this function to handle the insn->n > 1
>>> case as well.  Maybe in a follow-up patch?
>>
>> There are a couple that have the insn->n > 1 issue. For some of them I have
>> not located a datasheet/user manual to verify the proper way to handle
>> multiple writes to the DAC. I will fix those in follow-up patches.
>>
>
> In such cases, it's probably better just to write the last data value, 
> rather than the first.

I agree. If I can't locate a datasheet this is the approach I will use.

There are a couple drivers that still need converted to use the subdevice
readback. Some of them are a bit messy so I let them for follow-up patches.

The dt2815 driver actually appears to be broken. The subdevice init has the
maxdata =0xfff but the (*insn_write) only writes the lower 8-bits. I have
not been able to find any data on this board.

The dyna_pci10xx driver also appears to have some cut-paste issues. The
subdevice init has the range_table = &range_unipolar10 but the analog
output (*insn_write) has some 'range' code dealing with the analog input.
It also uses a mutex and some barrier code that looks a bit strange. Again,
I have not been able to find any data on this board.

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