RE: [PATCH 07/11] staging: comedi: drivers: use comedi_dio_insn_bits() for DIO subdevices

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

 



On Thursday, August 29, 2013 5:52 AM, Ian Abbott wrote:
> On 2013-08-28 21:29, H Hartley Sweeten wrote:
>> Use comedi_dio_insn_bits() to handle the boilerplate code to update
>> the subdevice s->state for DIO subdevices.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
>> Cc: Ian Abbott <abbotti@xxxxxxxxx>
>> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
>  [snip]
> diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
> index 40e8d56..f3b8514 100644

[snip]

> Since I was noting drivers that filtered register writes depending on 
> the mask in the earlier patches, addi_apci_3xxx is one of those.

Noted.

> [snip]
>> diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c
>> index 5c3a318..a2e38fe 100644

[snip]

> ii_pci20k is another.

> [snip]
>> diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
>> index 8f4afad..1c385e3 100644

[snip]

> me4000 is another.  The error returned when attempting to write to lines 
> configured as inputs was a little unusual!

I though the error was a bit odd also. I don't think the (*insn_bits) functions should
fail for this situation. If the user attempts to change the output state of a channel
configured as an input it should just be ignored.

> [snip]
>> diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c
>> index 00ebf4d..d29416b 100644

[snip[

> me_daq is another.

Ok.

So far these have been identified as doing conditional updates of the
state based on the mask:

8255
dt2817
ni_6527
pcl711
pcl726
addi_apci_3xxx
ii_pci20kc
me4000
me_daq

It could a argued that some of these only have the conditional update
because the driver was based on a previous driver that also had it. There
is a lot of cut-and-paste in the comedi drivers.

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